Part 5 Using Page Objects with Behavior Driven Development in an Agile Environment Demonstration

Part 5: Mock Two Week Sprint Day 8, Day 9 and Day 10

Day 8 of the Sprint

Daily Scrum
Planning Poker – The poker planning session is attended by the entire team and the Product Manager. The Product Manager turns up with a prioritized Product Backlog. The Product Manager presents each User Story to the team, answers any outstanding questions raised in the Requirements Workshop, and then sits back as the team votes on the level of effort required to deliver the User Story.

Automation Tasks Day 8 – The automation team members would continue creating test cases to verify the Acceptance Criteria has been meet and creating needed test data and test suite(s). The team members would also continue updating the Page Objects as code is delivered, and refactoring as needed. Any needed exploratory testing would continue. As new code is created, it should be checked into the CMS.

Acceptance Criteria Six Test:

/*----------------------------------------------------------------------
 * Filename: ServiceDownTest.java
 *
 *
 */

package com.cos.selenium.admin.test;

import static org.testng.AssertJUnit.assertTrue;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.testng.annotations.Test;
import com.fl.flpi.selenium.admin.pages.LoginPage;
import com.fl.flpi.selenium.common.BaseCosTest;

public class ServiceDownTest extends BaseCosTest {

    private LoginPage loginPage  = new loginPage ();

    @Test
    public void ServiceDownMessageTest() throws FindFailed {

        String testId = "Service Down Messaging Test";

        entered(testId);

        String userName = testData.getString("LOGIN_ONE_USERNAME");
        String pass = testData.getString(“LOGIN_ONE_PASSWORD”);

        loginPage.setValueInUsernameField(userName);
        loginPage.setValueInPasswordField(pass);
        loginPage.clickLoginBtn();
        assertTrue(driver.switchTo().alert().getText().contains("Service unavailable, please try again”"));
        

        leaving(testId);

    }



}
Acceptance Criteria Seven Test:
/*----------------------------------------------------------------------
 * Filename: LoginExpiredTest.java
 *
 *
 */

package com.cos.selenium.admin.test;

import static org.testng.AssertJUnit.assertTrue;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.testng.annotations.Test;
import com.fl.flpi.selenium.admin.pages.LoginPage;
import com.fl.flpi.selenium.common.BaseCosTest;

public class LoginExpiredTest extends BaseCosTest {

    private LoginPage loginPage  = new loginPage ();

    @Test
    public void LoginExpiredMessageTest() throws FindFailed {

        String testId = "Login Expired Message Test";

        entered(testId);

        String userName = testData.getString("LOGIN_EXPIRED_USERNAME");
        String pass = testData.getString(“LOGIN_EXPIRED_PASSWORD”);

        loginPage.setValueInUsernameField(userName);
        loginPage.setValueInPasswordField(pass);
        loginPage.clickLoginBtn();
        assertTrue(driver.switchTo().alert().getText().contains("Account has expired – refer to Help”"));
        

        leaving(testId);

    }



}

Day 9 of the Sprint

Daily Scrum
Automation Tasks Day 9 – The automation team members would continue creating test cases to verify the Acceptance Criteria has been meet and creating needed test data and test suite(s). The team members would also continue updating the Page Objects as code is delivered, and refactoring as needed. Any needed exploratory testing would continue. As new code is created, it should be checked into the CMS.

Shoulder Check – The automation engineer(s) would hold a shoulder check with the product owner to ensure that the automation test cases sufficiently cover the user story and acceptance criteria.

Day 10 of the Sprint

Sprint Review
The Sprint Review session is attended by the entire team, the Product Manager and guests. The point of the Sprint Review is to demonstrate the sprint deliverables and to assess the performance of the team against the pre-agreed sprint goals. At the Sprint Review the automation team would run their automated tests and get sign off from the Product Owner that they successfully covered the User Story and Acceptance criteria.

Retrospective
The retrospective is attended by the entire team. Retrospectives are intended to review mistakes/inefficiencies and the team agreeing on ways to make things better.

Closing comments: After the successful conclusion of the Sprint, the newly created code branch would need to be merged back to the CMS trunk.

Posted in automation

Download and extend ATF...

ATF Is Now Open Source

Join this 10 week program anytime...

DevOps Mastery Program

Get your DevOps health check now...

Free DevOps Assessment

X