Table of contents

Assembly Config Files

Last Updated: 4/22/2017

TAEF supports test assembly configuration files. A configuration file should have the same name as your test assembly + ".config". If you have a test assembly that is named MyUnitTests.dll, your configuration file should be named MyUnitTests.dll.config.

The configuration file should be placed in the same directory as your test assembly file.

.NET Configuration Files

The .NET Configuration files are XML files in the following form:

        <add key="AssemblySetup" value="Assembly setup configuration information"/>
        <add key="ClassSetup" value="Class setup configuration information"/>
        <add key="TestSetup" value="Test setup configuration information"/>
        <add key="Test" value="Test configuration information"/>

Note, the configuration file is a collection of name / value pairs. See MSDN for more info.

Reading the Configuration File from Your Tests

You can use the System.Configuration.ConfigurationManager class to read data from your configuration files. For example,

NameValueCollection appStgs = ConfigurationManager.AppSettings;

Send comments about this topic to Microsoft

© 2017 Microsoft