MCPcopy Create free account
hub / github.com/allure-examples/testng-java-maven / StepTest

Class StepTest

src/test/java/com/example/testng/StepTest.java:7–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import org.testng.annotations.Test;
6
7public 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected