Skip to main content

Posts

Showing posts with the label single test

Failing to Run a single Testng Group

We all have various testng groups added/modified/deleted each time we update our test cases. Many a times we would want to run only a single testng group though! Failing tests? Pre Condition: My Test Automation Suite is based on Selenium-Ant-Testng When we want to run a single testng group lets say "sereUnitTests": If you don't have a beforemethod/beforetest/beforeclass annotation, then you should check your code...Its possible that something went wrong at the code level If you have a beforemethod/beforetest/beforeclass annotation, then you should check for the groups listed under each annotation For Ex: my beforemethod looks like this: @BeforeMethod(groups={"unit", "integration"}) public void openReader() throws SeleniumException { // Some functionality } But I see that the group which I wanted to run isn't listed thus testng notices that there is a before method to be initiated before your actual tests run but then doesn't ...