Skip to content

Commit 2429746

Browse files
committed
Modified BaseTest to allow inline @step creation
1 parent cfdda36 commit 2429746

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/com/frameworkium/tests/internal/BaseTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
import org.testng.annotations.BeforeMethod;
1818
import org.testng.annotations.BeforeSuite;
1919
import org.testng.annotations.Listeners;
20+
import ru.yandex.qatools.allure.Allure;
2021
import ru.yandex.qatools.allure.annotations.Issue;
2122
import ru.yandex.qatools.allure.annotations.TestCaseId;
23+
import ru.yandex.qatools.allure.events.StepFinishedEvent;
24+
import ru.yandex.qatools.allure.events.StepStartedEvent;
2225

2326
import java.lang.reflect.Method;
2427
import java.util.ArrayList;
@@ -197,4 +200,12 @@ public SauceOnDemandAuthentication getAuthentication() {
197200
public static ScreenshotCapture getCapture() {
198201
return capture.get();
199202
}
203+
204+
public static void startStep(String stepName){
205+
Allure.LIFECYCLE.fire(new StepStartedEvent(stepName));
206+
}
207+
208+
public static void finishStep(){
209+
Allure.LIFECYCLE.fire(new StepFinishedEvent());
210+
}
200211
}

0 commit comments

Comments
 (0)