This project is read-only.

Settings in an external file

You can define in the config file the attribute settings to express that the settings are defined in an external file. The value of the attribute settings should match with the name of the external file containing the settings element.

It could be useful to develop several configs and settings file to manage different environments where you're executing your tests.

In the sample bellow, the settings are defined in an external file named MySettings.nbiset.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="nbi" type="NBi.NUnit.Runtime.NBiSection, NBi.NUnit.Runtime"/>
  </configSections>
  <nbi 
    testSuite=" MyFirstTestSuite\MyFirstTestSuite.nbits"
    settings=" MyFirstTestSuite\MySettings.nbiset"
  />
</configuration>

This file is a sample of an external file managing the settings.
<?xml version="1.0" encoding="utf-8"?>
<settings>
  <default apply-to="system-under-test">
    <connectionString>My Sut Default Connection String</connectionString>
  </default>
  <reference name="MyReference">
    <connectionString>My Reference Connection String</connectionString>
  </reference>
</settings>

Last edited Sep 1, 2014 at 9:23 PM by Seddryck, version 1

Comments

No comments yet.