Note: only the latest version is supported
This is an intermittent issue and there seems to be no pattern.
The step should execute.
StepNotFoundException is thrown
can you provide more information ?
Still based on the exception there are 2 possibilities:
1) It seems duplicate method names in java and having different BDD description. Make sure method names are different in java.
2) Java method not exist/created which is being called from BDD.
Hi Ravi,
First check with step.provider.pkg
property, make sure it points to correct package.
If that is correct then try with providing unique stepName
to your step implementation.
@QAFTestStep(description="user logins with {username} and {password}",stepName="user login with username and password")
public void login(String username,String password){
}
can you provide more information ?
Still based on the exception there are 2 possibilities:1. It seems duplicate method names in java and having different BDD description. Make sure method names are different in java. 2. Java method not exist/created which is being called from BDD.
@mishalhshah Yes, as per you pointed out. I was using different step descriptions for 2 overloaded methods. Thanks for informing about this limitation in QAF.
Hi Ravi,
First check with
step.provider.pkg
property, make sure it points to correct package.If that is correct then try with providing unique
stepName
to your step implementation.@QAFTestStep(description="user logins with {username} and {password}",stepName="user login with username and password") public void login(String username,String password){ }
What is the difference between "description" and "stepName" ? In our current projects, we use "description" and it works fine.
@mishalhshah Same methods names in different classes can also create issue ?
Thanks for the quick reply @mishalhshah @amitbhoraniya and @naeem-github
@mishalhshah Same methods names in different classes can also create issue ?
@raviguptasmarsh yes same java method names without unique "StepName" in QAFTestStep will create issue.
So as suggested by @amitbhoraniya , add the unique stepName in QAFTestStep annotation or give the different java method names. let me know after applying any of the above solution works for you or not.
stepName
is a unique identifier for QAFTestStep. If stepName
is not provided then QAF considers method name as a stepName
.
description
is used to call teststep from bdd file.
Most helpful comment
can you provide more information ?
Still based on the exception there are 2 possibilities:
1) It seems duplicate method names in java and having different BDD description. Make sure method names are different in java.
2) Java method not exist/created which is being called from BDD.