java - testng: why I can not run test based on group -
i want lauch integration tests (group=inttest) write xml config:
<!doctype suite system "http://testng.org/testng-1.0.dtd"> <suite name="service integration test" parallel="none"> <test verbose="1" name="service integration test"> <groups> <run> <include name="inttest.*"/> </run> </groups> </test> </suite>
but when ran intellij, no tests ran. if add 'classes' section this:
<!doctype suite system "http://testng.org/testng-1.0.dtd"> <suite name="service integration test" parallel="none"> <test verbose="1" name="service integration test"> <groups> <run> <include name="inttest.*"/> </run> </groups> <classes> <class name="com.service.mytestclass" /> </classes> </test> </suite>
then test of group 'inttest.*' contained in class com.service.mytestclass ran...
what's problem ?
as correctly found out, need tell testng classes should looking in order find groups specified.
you can specify entire packages if prefer.
as why test methods run, i'll need take @ class figure out what's going on. maybe made test methods belong group "inttest" specifying @test annotation @ class level?
Comments
Post a Comment