8000 @WithJunitRule executes rule for every scenario Β· Issue #118 Β· cucumber/cucumber-android Β· GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
@WithJunitRule executes rule for every scenarioΒ #118
Closed
@ThomasRichtsfeld

Description

@ThomasRichtsfeld

πŸ‘“ What did you see?

When using a class annotated with @WithJunitRule that contains a rule it gets executed for each scenario.

βœ… What did you expect to see?

I only expect the step classes that "inject" the rule in the constructor to execute the rule

πŸ“¦ Which tool/library version are you using?

We are running instrumented tests on Android using test orchestrator

"io.cucumber:cucumber-android" version 4.10.0

πŸ”¬ How could we reproduce it?

Rule example:

@WithJunitRule
internal class GrantCameraPermissionRuleHolder {

    @get:Rule
    val grantPermissionRule: GrantPermissionRule = GrantPermissionRule.grant(Manifest.permission.CAMERA)
}

This rule is not injected anywhere, but it still gets executed for each scenario

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0