@Test(dependsOnMethods = { "preTests" })
Ans. The threadPoolSize attribute specifies the number of threads to be assigned to the test method. This is used in conjunction with invocationCount attribute. The number of threads will get divided with the number of iterations of the test method specified in the invocationCount attribute.
@Test(threadPoolSize = 5, invocationCount = 10) public void threadPoolTest(){ //Test logic }
Ans. Using SkipException, we can conditionally skip a test case. On throwing the skipException, the test method is marked as skipped in the test execution report and any statement after throwing the exception will not get executed.
@Test public void testMethod(){ if(conditionToCheckForSkippingTest) throw new SkipException("Skipping the test"); //test logic }