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

Migration from Jbehave to Cucumber #1380

Closed
vaibhav2701 opened this issue Sep 21, 2018 · 5 comments
Closed

Migration from Jbehave to Cucumber #1380

vaibhav2701 opened this issue Sep 21, 2018 · 5 comments

Comments

@vaibhav2701
Copy link

Hi,

We have been using a serenity-jbehave framework for more than 2 years now for our functional test cases. But it seems Cucumber is now more popular and we decided to switch to serenity-cucumber setup.

The challenge is in our existing steps we have something like what is shown below at multiple places and it seems Cucumber is not happy about it. It wants unique steps for each step. Is there some workaround for this?? We can't afford to make so many changes at so many places.

'@given ( "user is logged into the application" )
@when ( "user is logged into the application" )
@then ( "user is logged into the application" )
public void givenUserIsLoggedIntoTheApplication() {
System.out.println( "Login is completed" );
}'

@mleegwt
Copy link

mleegwt commented Sep 21, 2018

This looks like a Cucumber issue cucumber/cucumber-jvm#1341

I don’t think this is a serenity(-cucumber) issue.

@wakaleo
Copy link
Member

wakaleo commented Sep 21, 2018

Use any one annotation, Cucumber will match any of the keywords.

@vaibhav2701
Copy link
Author

Ok so I guess I did not state the complete problem. Apart from @given, @when and @then pointing to same method the other issue which we have is @alias tag. We have used it generously in our JBehave framework but Cucumber it seems does not support it. The language of the steps is different but they refer to same implementation method. I tried looking for an answer in Cucumber groups as well but could not locate one.

@wakaleo
Copy link
Member

wakaleo commented Sep 25, 2018

You would use regexes for this

@wakaleo wakaleo closed this as completed Oct 13, 2018
@murthysp
Copy link

murthysp commented Sep 12, 2019

Hi @vaibhav2701 we are also planning to migrate from Jbehave to Cucumber. Can you please explain what are the steps you have taken and challenges you faced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants