A smarter way of doing automation within the sprint (5 mins read)

A smarter way of doing automation within the sprint (5 mins read)

Through this article, I am going to explain how to complete test automation before developers start to develop the application.

A Simple login module is taken as an example. Consider the below user story with 2 acceptance criteria (AC).

User Story - As a user I want to log in to ABC application using valid login credentials.

  • AC1 – Until user enter a username and a password, login button should be disabled.
  • AC2 – Once user enter valid login credentials and click on login button, user should be directed to home page.

This is the style guide provided from product owner. (from Google)

Definition of Done (DoD)

  • Story should be implemented
  • Story should be tested and test cases should be automated

As all of you know, automating all the test cases of a story within the sprint is a very challenging task. Therefore, most of the time automation tasks are getting spilled over to future sprints since the development is getting dragged till the last moment.

Let’s discuss a smarter way to overcome this automation challenge

As a tester, I have identified three very basic test cases to cover above ACs.

  • Login button disabled check
  • Login button enabled check
  • Successful login check

It took around 10-15 min to identify those test cases and add to test management tool.

At this point even though the developer has not started the development of this login module, I have started to automate the login module.

What?? You mean to tell that you are writing automation codes for the application which is not even implemented yet??

Of course. That is what I am going to discuss here.

I have started to write automation codes from test layer. For that I have added “LoginPageTest” class and added three test methods with meaningful names where a non-technical person also can understand. Please refer the below screenshots for further understanding.

Once I have done implementing the blue print of the test case, I have committed the code, so that developers can refer it to get an idea about the testing scenarios. (They can cover those areas in developer testing to prevent defects)

However, you can see there are seven errors in my test class. Now I am going to fix one by one by adding required classes and methods.

I have created a “LoginPage” and "HomePage"classes and added required methods. Also, I have created “BasePage” class since I have extended page classes from “BasePage

Now you can see there are only two errors (refer below screenshot) in "LoginPageTest" class.

Let’s fix them now.

Now you can see there are no any errors in "LoginPageTest" class. Please refer below screenshot.

However, still there are few errors in "LoginPage" and "HomePage" classes. Those are for element locators. You can fix these by adding dummy x-paths. (Please refer below screenshots)

Now you can see there are no any errors in automation code.

Stand up now, go to developer’s cubicle and have a chat.

Tester: Bro! Can you please tell me the id/name which you are going to use for username text box, password text box and login button?

Take those inputs and update your element locators accordingly.

Now you have completed your automation within the sprint and can be pushed to the remote repository.

Also this automation suite can be configured in CI/CD pipeline so that it can be executed against developer’s code of the login module.

We can cover a similar user story with automation within 30 mins. ??

Advantages of this approach.

  • Tests are ready in early stage of the sprint, so developers could identify test scenarios clearly while developing. Hence developers try to make those tests pass.
  • Clean and clear code (I have added only required methods in my java classes. So that there are no “method abc() is never used” warnings in IntelliJ IDEA.)

Enjoy!

Husny Jiffry

Senior Quality Engineer - Sysco LABS, Sri Lanka.

Alim Ali

Qa Lead @Wipro

4 年

Hi hussain,same thing i need to for api testing .with in sprint i need to finish all aitimation.i have some thing in mind. I need your inputs

回复
Joy Sen

Program Manager | Delivery Lead | Agile Practitioner | I specialise in driving digital transformation programs and help project teams to deliver their best work

7 年

Jack Ntlhamu I hope you are implementing this Jack!

Mahender Vemula

Engineering & Technology Leadership

7 年

Simple use case with good examples.

Mohanraj K

Associate Architect at Eleviant Technologies Pvt Ltd

7 年

Great approach.

要查看或添加评论,请登录

Husny Jeffrey的更多文章

  • Shift Left - How I carried out ETL & data migration testing activities (10 mins read)

    Shift Left - How I carried out ETL & data migration testing activities (10 mins read)

    Recently I got an opportunity to work in an ETL & Data Migration project. I would like to share the way I have carried…

    6 条评论
  • How I test an API of a microservice – (5 min read)

    How I test an API of a microservice – (5 min read)

    Before going to discuss about the topic, let’s understand what is a microservice. A microservice is basically an…

    7 条评论
  • Early testing through test automation (3 min read)

    Early testing through test automation (3 min read)

    Early testing through test automation taught few good lessons to our team. Recently our team developed a microservice…

    3 条评论
  • The agile way, we work II (2 min read)

    The agile way, we work II (2 min read)

    In last backlog grooming ceremony, our team re-assessed the priorities of items in the product backlog with product…

  • The agile way, we work!

    The agile way, we work!

    PO requested few changes in UI and we have responded for those in immediate iteration. Drew the proposed UI on a glass…

    1 条评论
  • How I think before designing test cases

    How I think before designing test cases

    This is not about “Test design techniques” rather “How I think before designing test cases”. This is based on my…

    9 条评论
  • PEARSON Corporate Social Responsibility (CSR)

    PEARSON Corporate Social Responsibility (CSR)

    Trying to make a difference in the life of people. Project "Strengthening Education through Safe Learning Spaces for…

  • Selenium WebDriver for beginners in Sinhala

    Selenium WebDriver for beginners in Sinhala

    Hi All, I created my second sinhala video tutorial. This is for people who going to start automation or who interesting…

    19 条评论
  • Software Manual Testing in Sinhala

    Software Manual Testing in Sinhala

    I created a YouTube tutorial in sinhala. This is my first tutorial.

  • Future of Artificial Intelligence

    Future of Artificial Intelligence

    AI is the computer system that is related to the similar task of using computers to understand human intelligence sense…

社区洞察

其他会员也浏览了