Skip to content
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

NPE when using String constant in the cucumber annotation #53

Open
mlasram opened this issue May 24, 2017 · 9 comments
Open

NPE when using String constant in the cucumber annotation #53

mlasram opened this issue May 24, 2017 · 9 comments
Labels
Feature Request Stale Probably not relevant anymore and to be closed

Comments

@mlasram
Copy link

mlasram commented May 24, 2017

NPE when using String constant in the cucumber annotation

Example:

public final String PROFILES = "'(admin|mobile)'";

@When(PROFILES + " do something")

naturallog.txt

@boy-m
Copy link

boy-m commented Nov 17, 2017

duplicate with #50

@rlogiacco
Copy link
Owner

rlogiacco commented May 28, 2020

Duplicate of #50

@rlogiacco rlogiacco marked this as a duplicate of #50 May 28, 2020
@drkstr101
Copy link
Contributor

Flagging for review in next.

@github-actions
Copy link

This issue has not been updated for a while: marking it as stale.

@github-actions github-actions bot added the Stale Probably not relevant anymore and to be closed label Jul 30, 2020
@github-actions github-actions bot closed this as completed Aug 6, 2020
@rlogiacco rlogiacco reopened this Aug 7, 2020
@drkstr101
Copy link
Contributor

@rlogiacco I don't think this has anything to do with Natural.

@rlogiacco
Copy link
Owner

I believe it does: as we are reading the annotations from the source files and without compiling the Natural plugin doesn't see the constant being expanded... This is my best guess ATM

@drkstr101
Copy link
Contributor

Oh I didn't realize this was how it worked. I assumed annotationValue would contain the string value. How would this work in the case of groovy step definitions, where you can pass an actual RegExp EG @Given(/^foo$/).

@rlogiacco
Copy link
Owner

:-) I thought you had already a try on this... You contributed heavy modifications to the stepmatcher... Let's check this before we move further with the release ;)

@drkstr101
Copy link
Contributor

drkstr101 commented Sep 18, 2020

Ah, only the most basic hello-world test. I don't think I've tested this style of syntax specifically. I do know I've written step definitions this way before however, so it was surprising to hear there is a compile time and runtime difference, which makes sense when I think about it. I agree it could use further exploration.

Unfortunatly all my modifications to the step matcher thus far have been entirely superficial. It is still your original system and design. I just wrapped it in a public API that doesn't depend on JDT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Stale Probably not relevant anymore and to be closed
Projects
None yet
Development

No branches or pull requests

4 participants