In this article, we will share about building reusable, reliable and loosely coupled test automation modules to enable a scalable approach. 

Quality at Speed is the main focus for evolving product teams. The need to accelerate software releases while maintaining quality is a key output of the World Quality Report 2020-2021.

Not only QA teams need to secure their testing responsibilities, but they should also provide a scalable solution to the whole team. In fact, they need to become an enabler.

But automation is complex, and when done wrong, it leads to worst-case situations. Quoting Bill Gates  “Automation applied to an inefficient operation will magnify the inefficiency.”. So how to deliver a scalable Test Automation?

Define the scope and requirements of your test library

First, we define the scope of our project based on our main business problems and test strategy:

  • Which area should we focus on? (Front-end, Back-end, which functional area?)
  • Which applications are in scope of the identified area?
  • Which technical layers should we consider in our modules?

Next, we can identify the requirements of the selected scope. They will depend on your particular context, however, we share some good practices:

  • Test structure is aligned on business use-cases and language
  • We can describe the test without having a “and” for the intent or verification
  • They are fast to execute for rapid feedback and easy to use by the team
  • They are reliable, keeping confidence and its use over time

In our case, we will verify that the main user functionalities of Cerberus Testing are working fine.

Identify the different modules to be build

At this stage, we are ready to list the possible test modules. This is a crucial step to secure the foundations of a scalable approach.

We can apply different test identification techniques such as Boundary Value Analysis or Equivalence Partitioning. In our case, we want to perform mainly web testing simulating user actions. So we will apply the Use Case Testing technique.

As an example, we discover the following customer journeys and main use-cases on Cerberus Testing:

  • Open the homepage
  • Be able to login (variant with valid or invalid password)
  • Navigate to the main pages
  • Create a Test case
  • Execute a Test Case
  • Access a Test Case

Implement your test cases by adding modules incrementally 

We now have a clear view of the scope. But we need to start the implementation at some point.

In the case of User Experience testing, we will compose over-time scenarios based on customer journeys. Therefore, the most pragmatic approach is to take them by order of product usage.

  • As a user, I want to access the homepage and verify its main elements
  • As a user, I want to access to login and verify my dashboard information
  • As a user, I want to access an existing test case to read its actions and controls
  • As a user, I want to execute an existing test case to verify an application status

As a result, the first test modules are emerging. Note that we delay the cases with complexity for later on, focusing on simple use-cases.

Figure 1: Our first test modules are appearing

Refactor your modules based on your first iteration

We could implement the remaining test modules of our list. However, as in software development, technical debt is already there. 

This is normal as we confront our ideal test cases with the reality of implementing them. Hence, we strongly recommend at that stage a refactoring session.

The main patterns to evolve are usually linked to coupling or duplication between our modules. For instance, externalize common locators or test data to ensure a good evolutivity of the tests.

Incrementally implement the remaining modules, with refactoring

We can now add different variations of use cases from more stable test modules.

In our case it could be:

  • Based on Homepage and Login test modules:
    • As a user, I want to login with invalid credentials and verify this is not possible
  • Based on the Homepage, Login and Execution test modules:
    • As a user, I want to execute a web application test
    • As a user, I want to execute a mobile application test
    • As a user, I want to execute an API application test
Figure 2: An example of a test case based on reusable test modules

We should perform a refactoring at that stage because we will discover new behaviour to optimize, duplication and coupling. Once done, you can start the next group of test modules.

We can implement more complex use-cases still based on the core modules:

  • As a user, I want to create a web test case and verify its creation
  • As a user, I want to create a web test case, execute and verify its result (*)

(*) Be careful here! We are breaking the principle of modularity by having too many functionalities and constraints in a single test. The best approach is to break down this test into separate test modules and test cases: One to create, one to execute and one to verify its result. 

Share your library and scale your approach!

Finally, after some iterations, your test modules will be ready with all the robust modules you made available!

Following the principle of having them with a common business language and a data-driven testing approach, you could allow your Product Owners to create their own tests by themselves.

I hope this article helps you in your test automation journey. The feature of Test library is natively available in Cerberus Testing, with readily available actions and controls you can leverage for fast test automation. 

You can also access our regression testing guide here. Happy Testing! 

Leave a comment

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

Cerberus-Testing Terms Of Service


Website Terms and Conditions of Use

1. Terms

By accessing this Website, accessible from http://vgeouyk.cluster030.hosting.ovh.net, you are agreeing to be bound by these Website Terms and Conditions of Use and agree that you are responsible for the agreement with any applicable local laws. If you disagree with any of these terms, you are prohibited from accessing this site. The materials contained in this Website are protected by copyright and trade mark law. These Terms of Service has been created with the help of the Terms of Service Generator and the Privacy Policy Template.

2. Use License

Permission is granted to temporarily download one copy of the materials on Cerberus Testing's Website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:

  • modify or copy the materials;
  • use the materials for any commercial purpose or for any public display;
  • attempt to reverse engineer any software contained on Cerberus Testing's Website;
  • remove any copyright or other proprietary notations from the materials; or
  • transferring the materials to another person or "mirror" the materials on any other server.

This will let Cerberus Testing to terminate upon violations of any of these restrictions. Upon termination, your viewing right will also be terminated and you should destroy any downloaded materials in your possession whether it is printed or electronic format.

3. Disclaimer

All the materials on Cerberus Testing’s Website are provided "as is". Cerberus Testing makes no warranties, may it be expressed or implied, therefore negates all other warranties. Furthermore, Cerberus Testing does not make any representations concerning the accuracy or reliability of the use of the materials on its Website or otherwise relating to such materials or any sites linked to this Website.

4. Limitations

Cerberus Testing or its suppliers will not be hold accountable for any damages that will arise with the use or inability to use the materials on Cerberus Testing’s Website, even if Cerberus Testing or an authorize representative of this Website has been notified, orally or written, of the possibility of such damage. Some jurisdiction does not allow limitations on implied warranties or limitations of liability for incidental damages, these limitations may not apply to you.

5. Revisions and Errata

The materials appearing on Cerberus Testing’s Website may include technical, typographical, or photographic errors. Cerberus Testing will not promise that any of the materials in this Website are accurate, complete, or current. Cerberus Testing may change the materials contained on its Website at any time without notice. Cerberus Testing does not make any commitment to update the materials.

6. Links

Cerberus Testing has not reviewed all of the sites linked to its Website and is not responsible for the contents of any such linked site. The presence of any link does not imply endorsement by Cerberus Testing of the site. The use of any linked website is at the user’s own risk.

7. Site Terms of Use Modifications

Cerberus Testing may revise these Terms of Use for its Website at any time without prior notice. By using this Website, you are agreeing to be bound by the current version of these Terms and Conditions of Use.

8. Your Privacy

Please read our Privacy Policy.

9. Governing Law

Any claim related to Cerberus Testing's Website shall be governed by the laws of fr without regards to its conflict of law provisions.

Thank you for your interest in cerberus,

In order to proceed with your SaaS we need some in order to confirm your instances accesses.

Please provide accurate contacts to secure the process.

You can cancel any time the subscription, please read Terms of Use.