Share via


ITestConfigurationHelper.CreateFromFile Method

Creates a new test configuration object by using the specified XML file.

Namespace:  Microsoft.TeamFoundation.TestManagement.Client
Assembly:  Microsoft.TeamFoundation.TestManagement.Client (in Microsoft.TeamFoundation.TestManagement.Client.dll)

Syntax

'Declaration
Function CreateFromFile ( _
    fileName As String _
) As ITestConfigurationCollection
ITestConfigurationCollection CreateFromFile(
    string fileName
)
ITestConfigurationCollection^ CreateFromFile(
    String^ fileName
)
abstract CreateFromFile : 
        fileName:string -> ITestConfigurationCollection
function CreateFromFile(
    fileName : String
) : ITestConfigurationCollection

Parameters

  • fileName
    Type: String

    The name and path of the file that contains the configuration.

Return Value

Type: Microsoft.TeamFoundation.TestManagement.Client.ITestConfigurationCollection
The new test configuration object will be created on the server only when its ITestBase.Save method is called.

Exceptions

Exception Condition
TestManagementValidationException

The new test configuration object was invalid.

XmlSchemaValidationException

The XML file failed schema validation.

Remarks

This method both validates the xml file against a schema and creates test configurations.

If the schema validation fails, the XmlSchemaValidationException will be thrown, and for other validation, TestManagementValidationException.

.NET Framework Security

See Also

Reference

ITestConfigurationHelper Interface

Microsoft.TeamFoundation.TestManagement.Client Namespace

ITestConfiguration

ITestBase.Save