Automation Process for a web application

How to start the automation, what are the best practices to start automation for large-scale web applications, In this automation tutorial, we will see what an end-to-end automation process is to automate the complete testing of a web application.

Steps to automate a web application

  • Requirement analysis.
  • Testcase Writing.
  • Test Execution and Manual Testing.
  • Create a data-driven Page Object Model (POM) automation framework.
  • Automation suite execution.
  • CI/CD integration(Git and Jenkins).

Requirement analysis

Requirement analysis is the most important step to start the automation. There are some key points on which basis we can analyze the requirements

  1. Write individual stories.
  2. User roles.
  3. Stories Interlinking.

Individual stories

If there is a large-scale application, then we can divide the requirements into small Modules or sprints, or Stories. The best way is to divide the requirements into small modules and submodules and then create stories.

User roles

There can be multiple users of the application that will interact with the application directly or indirectly. Observe the roles of the different users that going to connect with the application directly and indirectly.

Stories Interlinking

Find the dependencies of one story on other stories at the same time we can observe the user dependencies. Create all the end-to-end scenarios that define the user linking or story linking.

Testcase Writing

Start writing testcases according to the stories The best way to write the test scenarios is the BDD technique. Always use the Gherkin language to write it. Test scenarios should be simple and clear so even a new person that comes into the team can understand the application requirement by using Stories and Testcases.

Another important point divides the testcases into categories like common testcases(Login into the app), smoke testcases, and Regression testcases.

Testcases Executions

Execute the testcases manually and make sure the application is stable and ready for automation. Basically, this is the work of the manual testing team so once you get a green single, As an automation engineer it’s your responsibility the run each and every testcase and analyzes the results before writing the script and make sure the functionality is working fine. we can start the automation code.

Create Automation Framework

There are multi-type automation frameworks available but for a large-scale application, I will always recommend the Hybrid Poage Object Model(Data-Driven) automation framework. that is help to manage the external resources and reusability of the code.

Key files of framework

  1. Features file
  2. Pages
  3. Test Steps
  4. Utility
  5. Configuration file
  6. Hooks
  7. Report configuration

Automation Execution

Execute the automation suite local with multiple environments or browsers like Chrome, IE, and Firefox(If it’s a web application) and observe the performance of the application.

CI/CD integration

Once everything is fine and stable, Push the code on central repo Like Git and create an automation environment on Jenkins that will help to run the automation suite overnight and we can observe the application performance on daily basis.

Git is a center repo where we can store the automation source code suite, and Jenkins is a tool that creates an environment to run that automation suite. Jenkins has many more features that make the process very easy the most important things. Autoexection and report generation, It has a user-friendly dashboard to analyze the execution results.

Good Practices to write an automation script

  • Always try to keep minimum dependencies. It means keeping the element path, business logic, and test steps in separate files.
  • Test the script in multiple browsers. Once the script is done execute it with multiple browsers like Chrome, Firefox, and IE.
  • Every test script must have the Assertion or verification part. If possible try to write multiple assertions to generate more security about the script.
  • User Dynamic waits. The static wait is not good practice so always add the dynamic wait.
  • Always generate the random data from input fields.
  • Always use the external files to store the required and static data like username, password, URL, and so on.