Hello,
My team is implementing GraphWalker to test the Key Customer Journey of the Product.
We need to implement some code before and after each vertex and edge. We are using @BeforeElement and @AfterElement annotation to implement the same.
Somehow the code is not working.
Regards,
Sachin Ahuja
Below is the code snippet, we are using.
@GraphWalker(value="random(edge_coverage(100))",start="e_Start")
publicclassEE_TestextendsExecutionContextimplementsEE_Model{
public final static Path MODEL_PATH = Paths.get("src/main/resources/org/testAutomation/EE_Model.json");
@BeforeElement
void beforeElement(){
System.out.println("After Element " + getCurrentElement().getName());
}
@AfterElement
void afterElement(){
System.out.println("After Element " + getCurrentElement().getName());
}
@Override
public void v_VerifyOktaLoginPage() {
}
@Override
public void e_ValidLogin() {
}
@Override
public void e_InvalidLogin() {
}
@Override
public void e_NavigateSearchScreen() {
}
@Override
public void v_VerifyEntitlementWorkspacePage() {
}
@Override
public void e_OpenUserInList() {
}
@Override
public void e_NavigateEEHomePage() {
}
@Override
public void e_OpenBrowserNavigateEE() {
}
@Override
public void v_VerifyMessageSearchBox() {
}
@Override
public void e_SearchValidUserWithEmail() {
}
@Override
public void e_ChangeAccessRole() {
}
@Override
public void e_SearchInvalidUserWithEmail() {
}
@Override
public void v_VerifyUserAccessRoleScreen() {
}
@Override
public void v_VerifySearchResults() {
}
@Override
public void v_Start() {
}
@Override
public void v_VerifySearchUserPage() {
}
@Override
public void e_NavigateBackToSearchResults() {
}
@Override
public void v_VerifyOktaLoginPageWithError() {
}
@Override
public void v_VerifyRoleChanges() {
}
@Override
public void e_NewEdge() {
}
@Test
public void runStabilityTest() {
TestBuilder builder = new TestBuilder();
builder.addContext(new EE_Test(), MODEL_PATH, new RandomPath(new TimeDuration(30, TimeUnit.SECONDS)));
builder.execute();
}
}