Nunit - Why single test with unique name is executing multiple times? -
i have test like
[test] [testcase("chrome", testname = "one")] [testcase("firefox", testname = "two")] [testcase("ie", testname = "three")] public void mytest(string browser) { ............. }
i calling through programming as
simplenamefilter filter = new simplenamefilter() { }; test = "seleniumtests.test.one"; filter.add(test); coreextensions.host.initializeservice(); testpackage testpackage = new testpackage(@"d:\test.dll"); remotetestrunner remotetestrunner = new remotetestrunner(); remotetestrunner.load(testpackage); testresult result = remotetestrunner.run(new nulllistener(), filter, true, loggingthreshold.all);
when executed above code, test "one" executing , calling multiple time, can tell why happening this?
thanks in advance, kishore.
first of in case don't need first [test]
, since have [testcase(...)]
. remove attribute , see if going make difference. second of all, believe happens is, test class - one
(is think called it) get's picked , executes tests within class. example mytest
run 3 times (for each testcase
).
i hope understood correct.
Comments
Post a Comment