Test Method


  • Test methods are compromised of test steps

  • Test steps are compromised of

    • Step comment

    • Data object

    • Panel action

    • VerifyLoginTest.java
      TestLog.When("I login with admin user");
      UserObject user = UserObject.user().withAdminLogin();

Step Comments

  • TestLog.When("I login with admin user");
  • Comments follow the Gherkins natural language model

  • These comments are displayed in the extent test report

  • Options are: Given, When, And, Then, But, Background

Data Objects

  • Data objects describe the data we want to use in the actions

  • VerifyLoginTest.java
    UserObject user = UserObject.user().withAdminLogin();
  • Refer to Test Object section for more info

Panel Action

  • Actions refer to methods described in Panel classes

  • app.webApp.login.login(user);
  • Syntax: app.<module>.<panel>.<action>

  • We can call any of the modules and actions in our test environment

  • This allows for cross platform and cross application testing

  • eg. testing android and web together in one test method

Sample Test Class

public class VerifyLoginTest extends TestBase {
public void beforeMethod() throws Exception {
public void verifyAdminUserWithCsvData() {
User user = Data.webApp.user().admin();
TestLog.When("I login with user " + user.getUsername());
TestLog.Then("I verify admin logo is displayed");
TestLog.When("I logout");
TestLog.Then("I should see the login panel");