This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
With the following testNG xml file, I notice that not only the first test of each class is executed AND the @AfterClass method is not executed. After the first test finishes execution, the @BeoreClass of the next test-class is executed.
The execution fails because the @AfterClass method is supposed to clean-up after all tests in the class are executed. Also, in the test code, I am using @Test(priority=<number>, alwaysRun = true)
Sorry, if my comments are confusing. At this point, even I am confused!
Here's the situation:
- The tests are launched
- First test of the first class is executed
- The rest of the tests are skipped
- Control goes on to run the tests of the next class - but in between, the @AfterClass of the previous test class is not executed
So, as I see, there are two issues:
1. Why is only the first test of each test class is executed (i.e. the rest of the tests are skipped - not even attempted to be executed)
2. Why is @AfterClass method of each test class is not exevuted