New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor fails, if step definitions have constructor with dependency injection like pico-container. #303
Comments
Hi @phanikshr The Cucumber Eclipse plugin does not use pico-container. Thus, your example can not work. |
phanikshr (or anyone else who finds their way here) check if your step definition specified
If so, simply replace it with
|
@mikejramsey56 Brilliant!! That did the job for me. Thank you! |
Could you provide a sample to reproduce your issue please ? |
@qvdk You can use my repo: https://github.com/AlanBarrera/CucumberExercisesRepo In the StepDefs_Register.java file, change these individual imports: import cucumber.api.java.en.Given; for: import cucumber.api.java.en.*; Then open the Register.feature and an error window should prompt. |
Thanks @AlanBarrera I will take a look |
Alan, |
It worked for me |
Thanks @mikejramsey56 ! Changing the '.*' to '.Then', 'When', ... etc works for me! |
I accidentally changed all the individual '.Then', '.When' ... to '.*' and hit the same issue immediately. Thanks again @mikejramsey56 . |
HI,
you can refer this discussion to solve this issue
#383
Thanks
Rakesh
…On Thu, Jan 9, 2020 at 2:44 PM Aly Magdy ***@***.***> wrote:
Please can anyone be of help to me. I have having those yellow signs in my
feature file which says Step "XXXXXXX" does not have a matching glue code,
though i have the step definitions. My feature files are in
src/test/resources/Features folder while my stepDefinitions class are in
src/test/java/steps package. *I am relatively new to Cucumber*
[image: CucumberCapture]
<https://user-images.githubusercontent.com/51756222/62411844-b6363200-b5f9-11e9-844b-2048d144b790.PNG>
[image: CucumberGlueCode]
<https://user-images.githubusercontent.com/51756222/62411845-b6363200-b5f9-11e9-94de-b7aad5b46ab8.PNG>
These are my cucumber dependencies
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.5.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-testng -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>4.5.4</version>
</dependency>
If you're sure you include your step def file correct , just try to close
the .feature file from your open tabs in eclipse and then open it again ,
you will notice the down in eclipse that there's a new scanning for step
defs. Hope it will work with you!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#303?email_source=notifications&email_token=AFBWYN5ZK2WPCNME7CHFQJDQ43THJA5CNFSM4GKCAWVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIPSB3A#issuecomment-572465388>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBWYNY2S34SRSZM56LDRCDQ43THJANCNFSM4GKCAWVA>
.
|
Why on earth is it necessary to import each keyword separately? |
Getting error message "An internal error occurred during: "Scanning for step definitions".
java.lang.NullPointerException"
My stepdef file looks like
public class mynewstepdefs{
public String str1;
public int int1;
public mynewstepdefs(parallelcontext context){
}
}
The text was updated successfully, but these errors were encountered: