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

2384: Fix edge case bug for @setup in dry run mode #2519

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion karate-core/src/main/java/com/intuit/karate/core/Step.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public boolean isFake() {
}

public boolean isSetup() {
return scenario.isSetup();
return scenario !=null && scenario.isSetup();
}

@Override
Expand Down
3 changes: 3 additions & 0 deletions karate-junit5/src/test/java/karate/setup-with-dryrun.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Feature: names

Background:
* print 'background'

@setup
Scenario: first hello world
* def names = [{"name": "dynamic_1"}, {"name": "dynamic_2"}]
Expand Down