Closed
Description
π 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
Labels
No labels