Skip to content

Commit

Permalink
Merge pull request #2519 from codehackerr/develop
Browse files Browse the repository at this point in the history
2384: Fix edge case bug for @setup in dry run mode
  • Loading branch information
ptrthomas authored Apr 3, 2024
2 parents 2050f57 + 415649c commit 4012901
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 4012901

Please sign in to comment.