BeforeElement/AfterElement not working.

30 views
Skip to first unread message

sachin...@gmail.com

unread,
Aug 12, 2021, 5:35:16 AM8/12/21
to GraphWalker

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();
}

 

}

 

sachin...@gmail.com

unread,
Aug 16, 2021, 3:12:31 AM8/16/21
to GraphWalker
Hello Guys,

We are stuck here with BeforeElement and AfterElement.
Attached are the Model json and Implementation file.
Please help us.

Regards,
Sachin

EE_Model.json

sachin...@gmail.com

unread,
Aug 16, 2021, 3:13:28 AM8/16/21
to GraphWalker
EE_Model.json
EE_Test.java
Reply all
Reply to author
Forward
0 new messages