| 5 | import org.testng.annotations.Test; |
| 6 | |
| 7 | public class StepTest { |
| 8 | |
| 9 | private static final String GLOBAL_PARAMETER = "global value"; |
| 10 | |
| 11 | @Test |
| 12 | public void annotatedStepTest() { |
| 13 | annotatedStep("local value"); |
| 14 | } |
| 15 | |
| 16 | @Test |
| 17 | public void lambdaStepTest() { |
| 18 | final String localParameter = "parameter value"; |
| 19 | Allure.step(String.format("Parent lambda step with parameter [%s]", localParameter), (step) -> { |
| 20 | step.parameter("parameter", localParameter); |
| 21 | Allure.step(String.format("Nested lambda step with global parameter [%s]", GLOBAL_PARAMETER)); |
| 22 | }); |
| 23 | } |
| 24 | |
| 25 | @Step("Parent annotated step with parameter [{parameter}]") |
| 26 | public void annotatedStep(final String parameter) { |
| 27 | nestedAnnotatedStep(); |
| 28 | } |
| 29 | |
| 30 | @Step("Nested annotated step with global parameter [{this.GLOBAL_PARAMETER}]") |
| 31 | public void nestedAnnotatedStep() { |
| 32 | |
| 33 | } |
| 34 | |
| 35 | } |
nothing calls this directly
no outgoing calls
no test coverage detected