Skip to main content

Posts

Showing posts with the label testng fails

TestNG Error: Reference testng-impl-classpath not found

When we are running testng ant tasks we might get this error:  "Reference testng-impl-classpath not found" You should look at the testng.xml file you are using for testng to pick up your classes from!!! Like mine has the following:                          Now you should check if your classes mentioned in the file are found at the exact path.. I have a mistake in the path. My classes are found under Panels.LeftPanels.Barrel.TestBookBox Thus the error. So solution: Check if you have any mistake in the class path you mentioned!!!!

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