IntelliJ run TestNG tests in 1 directory -
i have separated unit , integration tests separate intellij "test sources" directories. when right-click on unit test folder , attempt run tests, integration tests roped in well.
i able right-click on unit test folder , have tests under folder run , same integration tests.
is there way in intellij or going have use testng.xml file accomplish this?
how using 2 test groups , creating 2 run configurations, 1 unit testing , 1 integration testing:
1) dummy test class simulates both categories
import org.testng.annotations.test; public class categorytests { @test(groups = "unit") public void someunittest(){ } @test(groups = "integration") public void someintegrationtest(){ } }
2) unit test ij run config (notice group setup)
3) integration test ij run config (again, notice group setup)
4) in 1 sample
Comments
Post a Comment