unit testing - CodedUITests: Can i cancel a testrun when some requierements in ClassInitialize couldnt reached? -
is there way cancel testrun in classinitialize()?
for example, start application wanted test in classinitialize() method. if application couldnt started wanted cancel testrun , mark failure, prevent other steps testinitialzie() , execution of specific testmethod(). there statement wich supports that?
or have set variable in classinitialize() , check variable when starts testmethod() , dependent value of variable mark testmethod() failure or not?
thanks in advance
try this:
[classinitialize] public static void classinitialize(testcontext testcontext) { ... assert.isfalse(haserrors, "aborting {0}", testcontext.testname); }
Comments
Post a Comment