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

Annotation to add additional scan paths for stepdefs #31

Closed
oc opened this issue Sep 1, 2011 · 2 comments
Closed

Annotation to add additional scan paths for stepdefs #31

oc opened this issue Sep 1, 2011 · 2 comments

Comments

@oc
Copy link
Contributor

oc commented Sep 1, 2011

Just thought I'd ask for opinions before starting to implement.

Because I like to structure related steps together (package by feature) - I want to be able to add additional stepdefs to the Cucumber junit runner.

@UseStepdefs(packages = {"open.source.stepdefs", "cucumber.generic.stepdefs", "steps.web"})

WDYT?


Feature: annotation to scan for steps 
  In order to abstract generic step definitions
  As a developer
  I want to be able to scan for additional packages

  Scenario: Have generic steps for web testing
    # ...
package steps.security;

@RunWith(Cucumber.class)
@Feature("prevent_hijacking.feature")
@UseStepdefs(packages = {"open.source.stepdefs", "cucumber.generic.stepdefs", "steps.order", "steps.operations"}) 
public class PreventHijackingFeature {

    ApplicationSystemDriver appDriver;

    @Before
    public void startApp() {
        appDriver = new ApplicationSystemDriver(new ApplicationContainer());
    }

   // @Given ...
}
@aslakhellesoy
Copy link
Contributor

Awesome. I tweaked it so that we get one backend where all code can communicate (instead of a backend per package, where they would be isolated).

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants