nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01508
[Question #141938]: Test a Suite of Fixture
New question #141938 on NUnit Framework:
https://answers.launchpad.net/nunit-3.0/+question/141938
Hey,
I would like to execute a specific of Fixtures. I can't use the "category" because I determine dynamically fixture to execute.
So I followed the NUnit documentation (on http://www.nunit.org/index.php?p=suite&r=2.5.9), and my program looks to be the same :
public class AllTests
{
[Suite()]
private static IEnumerable Suite
{
get
{
//irectory.GetFiles(ConfigurationPath.GetFolderPath(), "Test-*.psm1");
var suite = new ArrayList()
{
new FixtureRunner("Test-Install-IrisVente1.psm1"),
new FixtureRunner("Test-Install-IrisVente2.psm1"),
new FixtureRunner("Test-Install-IrisVente3.psm1"),
new FixtureRunner("Test-Install-IrisVente4.psm1")
};
return suite;
}
}
}
[TestFixture(typeof(string))]
public class FixtureRunner
{
public FixtureRunner(string name)
{
[...]
}
[...]
}
When I call the console runner or the nunit Gui (through a command line), the same fixture is executed 4 times instead of executing 4 differents fixtures.
Do you have any idea of how I could use Suite attribute ? Does it still work ?
If not, how can I dynamically decide which fixture to run (a bit like TestCaseSource("FunctionsToTest") but with Fixture).
Thanks for your answer,
max
--
You received this question notification because you are a member of
NUnit Core Developers, which is an answer contact for NUnit Framework.