<linearGradient id="sl-pl-bubble-svg-grad01" linear-gradient(90deg, #ff8c59, #ffb37f 24%, #a3bf5f 49%, #7ca63a 75%, #527f32)
Loading ...

QA essentials

Your go-to quality assurance source

Software Testing Challenge – Test Automation Exercise

Just to repeat once again, the best way to learn new things is to do them. Practice makes perfect. In today’s challenge we are doing UI automation test of a simulation of bank software. Remember to follow best practices in programming. Try not to repeat the code, cover as many test cases as needed, but have some priorities. Test automation should not cover absolutely everything. Create your framework to be easy to use and to maintain. Keep it simple so even the people who read your code but do not know anything about the project can understand your intent. If you feel like it, you can repeat the test automation exercise with different tools and frameworks.

My choice for this exercise was Cypress with Javascript. It felt natural since the website was written in Angular, although that shouldn’t stop you from using the framework you are mostly familiar with. For more experienced test automation engineers, you can try with a tool you haven’t used before. This is a perfect opportunity for you to learn something new.

Introduction

  • Visit https://www.globalsqa.com/angularJs-protractor/BankingProject/#/login
  • This website has two parts: login for bank manager and login for customers
  • Bank manager can administer the customer accounts
  • Bank manager has access to the customer database
  • Customers can deposit and withdraw money from their accounts
  • Customers can see their transactions history

Just a warning for those who have read up to here, the website does not store the (new) data in real database. Sometimes the website will act up on you and you may need to delete cache to fix it. I experienced this with Cypress specifically when I ran the tests in open mode. The good part about it is that if you decide to delete some data that already exists, you just need to delete cache and it will appear again. This non-persistent state also mean that you may have to create interdependent tests which is contrary to the best practice. Alternative is to sacrifice the performance of your tests and run separate setup before each test which may take longer to execute but the tests will not depend on each other. In this case, both are acceptable.

test automation exercise

Here is your assignment

  • Create test cases for bank manager pages (creation of customers, creating accounts, deleting customers, searching the database, etc)
  • Feel free to use Cucumber if you like but it’s not the same without real BDD
  • Create test cases for customer pages (depositing money, withdrawing, reviewing transactions)
  • Create test automation of these cases in tool of your choice
  • Try to create a custom testing framework for easier maintenance instead of piling up test commands in a single file
  • Setup reporting with screenshots in the framework

The solution of the test automation exercise you can find at my Github page. Post links to your Github pages with your solutions or if you need any help let me know. Oh, and remember to have fun.

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam! We keep your data private and share it only with third parties that make this service possible. Read our privacy policy for more info.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.