How to run the ordered tests from the code
I have a set of tests(around 30) which i have to run multiple times, by changing certain configurations. My idea is to create an ordered test containing all the 30 methods and want to run this. I want to know if i can do that. i could not get any help from go开发者_高级运维ogle search results. :(
Provided test1(), test2()... are your already existing test methods, how about something like this:
[Test]
public void run_all_confs()
{
test_in_conf1();
test_in_conf2();
}
public void test_in_conf1()
{
setup_conf1();
run_tests();
}
public void test_in_conf2()
{
setup_conf2();
run_tests();
}
public void run_tests()
{
test1();
test2();
// ...
test30();
}
You should be able to port this in any test environment I know about.
精彩评论