-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
96bc2b9
commit 0345c95
Showing
6 changed files
with
118 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
dd-java-agent/instrumentation/karate/src/test/java/org/example/TestWithSetupKarate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.example; | ||
|
||
import com.intuit.karate.junit5.Karate; | ||
|
||
public class TestWithSetupKarate { | ||
|
||
@Karate.Test | ||
public Karate testSucceed() { | ||
return Karate.run("classpath:org/example/test_with_setup.feature"); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
dd-java-agent/instrumentation/karate/src/test/java/org/example/karate-config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
function fn() { | ||
} |
27 changes: 27 additions & 0 deletions
27
dd-java-agent/instrumentation/karate/src/test/java/org/example/test_with_setup.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Feature: test with setup | ||
|
||
@setup | ||
Scenario: setup scenario | ||
* call read('@setupStep') | ||
* def data = | ||
""" | ||
[ | ||
{foo: "bar"} | ||
] | ||
""" | ||
|
||
@withSetup | ||
Scenario Outline: first scenario | ||
* print foo | ||
Examples: | ||
| karate.setup().data | | ||
|
||
@withSetupOnce | ||
Scenario Outline: second scenario | ||
* print foo | ||
Examples: | ||
| karate.setupOnce().data | | ||
|
||
@ignore @setupStep | ||
Scenario: setup step | ||
* print 'test' |