'Error Meta-data: {"dataFile":"resources/env1/data.json"}@scenarios/jsonformfiller.feature#5 TestStep implementation not found
Error
Meta-data: {"dataFile":"resources/env1/data.json","description":"Data driven test that uses enter code herejson file to provide data"}@scenarios/jsonformfiller.feature#5 TestStep implementation not found. Please provide implementation or ensure 'step.provider.pkg' property value includes appropriate package.
Step Definition
@QAFTestStep(description = "user is on google Web Page")
public void step1() {
try {
GooglePage googlepage = new GooglePage();
googlepage.invoke();
googlepage.waitForPageToLoad();
System.out.println("I am on Google Search Page");
} catch(Exception e) {
}
}
@QAFTestStep(description = "user enters text {strText} in google search box")
public void enterSearchText(String strText) {
try {
GooglePage googlepage = new GooglePage();
googlepage.googleSearchTextBox.verifyPresent("google search TextBox");
googlepage.googleSearchTextBox.sendKeys(strText);
System.out.println("I search for " + strText);
} catch (Exception e) {
}
}
Could not include the whole step definitons code here stack overflow warning me that i added too much code
Feature: Validate Web Form
Scenario: Validate User is able to fill form using json Data File
Meta-data: {"dataFile":"resources/env1/data.json","description":"Data driven test that uses
json file to provide data"}
Given user is on clevermedia web form
When user enters first name '${firstname}' from json data file
And user enters last name '${lastname}' from json data file
And user enters zipcode '${zipcode}' from json data file
And user enters message '${message}' from json data file
And user clicks on submit
Then user should be able to submit form successfully
Step Definition - all feature file test steps are defined in the below step definitions QAFTestSteps.
TestNG Configuration for Test Execution
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="QAF Demo" parallel="methods" verbose="0">
<test name="QAF-BDD-Test">
<parameter name="step.provider.pkg" value="com.qmetry.qaf.clevermedia.steps" />
<parameter name="scenario.file.loc" value="scenarios/jsonformfiller.feature" />
<parameter name="env.resources" value="resources/env1" />
<classes>
<class name="com.qmetry.qaf.automation.step.client.gherkin.GherkinScenarioFactory" />
</classes>
</test>
</suite>
Does anyone see an error in my step in implementing the Data Provider ? why am i getting this error? All feature file steps are defined or have the corrosponding QAFTestStep. Testng configuration for the test execution included above also appears to correct.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
