10 coding watchouts for an Automation Developer - Part 3

Ravi Beck
September 8, 2020

Click here to read about 10 coding watchouts for an Automation Developer- Part 2

  1.   Testing Framework

A framework usually takes away the grunt work out of running the tests, generating reports. The most common frameworks used in automation is JUnit & TestNG. Moreover you can design your own framework.TestNG is a preferred framework for testers. It is inherited from JUnit and NUnit. It allows you to group test cases easily which is not possible in JUnit.Using a framework like TestNG gives you to flexibility to define execution order, dependency on other cases/skipped if one or more cases fail, etc.It also has automatically to generate test reports in both HTML and XML formats.

  1.  Retrieving test data from external files

Instead of hard coding, it will be better to keep test data is kept in external files and read it through your script.For example : to compare data, use for data-driven testing or it can even be used for Assertion/Validation purposes.Keeping test data in external files is always a good approach. It gives the feasibility to make changes in just one file whenever test data changes rather than tampering your entire code.

  1.   Modularize your code

Always follow “Divide and conquer”.Smaller the size of code component, easier it is to maintain.It will provide more reusability and separation of concerns. It becomes even more beneficial when working in teams for others to understand the code easily.

By: Ravi Beck


About Quinbay

Quinbay is a dynamic one stop technology company driven by the passion to disrupt technology today and define the future.
We private label and create digital future tech platforms for you.

Digitized . Automated . Intelligent