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

Suggestion: allow direct scenario calls by using reserved tags for sugar coating call read #1788

Closed
Gokuroro opened this issue Oct 4, 2021 · 3 comments
Labels

Comments

@Gokuroro
Copy link

Gokuroro commented Oct 4, 2021

The current Karate Way avoids the creation of new steps, but allows for calling scenarios by using a tag reference (example like @name=login).

My suggestion is to allow the use of reserved tags (like the @ignore tag) that allows the call of feature scenarios as part of the steps (as sugar coating for the internal call step).

Use format:

Feature: My Feature file with steps

@Given(I log into the application as "<username>")
Scenario: Some scenario name here
  * request { user: <username> }
...

@smoke-test
Scenario: My actual smoke test
   Given I log into the application as "my_user"
...

This could both make some (mostly UI) test cases more readable and more maintainable (in case of interface variation).

@sspears-deloitte
Copy link
Contributor

sspears-deloitte commented Oct 4, 2021

  • call read('/some/path/to/X.feature@smoke-test')

This is the current way to call specific scenarios by tag in a feature file. Does this work for your need?

@Gokuroro
Copy link
Author

Gokuroro commented Oct 4, 2021

Thanks @stevenspears, as mentioned in the proposal, the idea is for it to be more of a sugar coating from the call step definition for better test readability.

My belief is that Karate is very good and going to the right places where it comes to making use of the Gherkin language, and I understand that adding new implementations to the mix through coding is not part of the Karate way, my suggestion is a sugar coating method (by the use of reserved tags) to do the call read method.

@Gokuroro Gokuroro changed the title Suggestion: allow direct scenario calls by using reserved tags Suggestion: allow direct scenario calls by using reserved tags for sugar coating call read Oct 4, 2021
@ptrthomas
Copy link
Member

@Gokuroro nope :) we are not going to go down the direction of Given I log into the blah ever. Karate is designed as a programming language (very close to JS). you can read a very detailed discussion on this here: #398

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

No branches or pull requests

3 participants