I am using TestRunner class which extends AbstractTestNGCucumberTests to run cucumber feature files in Testng. I have a Issue in the last step where I am using ApprovalTests to verify the response I get from database. I am seeing an exception
"com.spun.util.FormattedException: Didn't find cucumber.api.testng.AbstractTestNGCucumberTests under C:\Users\nsyed\Awris2\LearnDatabase"
Does anyone know why is this exception coming?? My Runner class is:
@CucumberOptions(features = {"src/test/java/Features/ValidateStagingDB.feature"}
,glue={"StepDefinition"}
,dryRun=false
,strict=true
,public class TestRunner extends AbstractTestNGCucumberTests{}`
And Exceptions is here at Approvals.VerifyAsJso
@Then("^the response should match the golden copy$") public void the_response_should_match_the_golden_copy() throws Throwable {
try {
Approvals.verifyAsJson(DbHelper2.getJsonRepresentationFor(TableData));
}
catch(Exception e) {
System.err.println(e);
}
finally {
System.out.println("Closing the database connection");
connection.close();
}