Test automation Best practices and Guidelines - NextensArelB/SwaggerGenerationTool GitHub Wiki
[[TOC]]
##Introduction In this chapter you find the generic best practices and guidelines on the level of process and automation.
##Best practices: the process
-
Start collaboration between development and test effort at the start of the development of an user story Right at the beginning of the development process testers and developers should start thinking and implementing about the test scenarios and work out a plan what to include in unit tests, API tests and UI tests. In some cases you can even practice the concept of Test driven development where you first start writing tests and based upon that start implementing your code. We want to make sure the tests are as effective as possible without hindering the progress of delivering the user story.
-
Write your tests in an structured fashion
-
Use the folder structure wich is common or recommended for the test tool used.
-
Use the code-structure that are common for the test tool used.
-
Use the recommended naming convention of the tests (file) or use comments to clearify the purpose
-
Write independend tests (use mock objects to overcome dependencies)
-
Try to keep your test cases small and repeatable
-
Create (or update existing) for each functional bug found an automated script
-
Start automation synchronous with the development of the functionality
-
Have unit tests immediately part of the build and deploy process
-
Avoid duplication
-
Use your own test data for your test cases, don't rely on test data used by the application
-
Make you test cases reliable: you should be able to run them multiple times and not failing because of external factors
-
Make your test cases modular so they can be reused as much as possible
-
Add Readme file to describe instructions or additional comments if required
-
-
Follow a CRUD approach wherever possible C - Create data R - Retrieve data U - Update data D - Delete data created
##New test software tools Test software tools/frameworks that are being used by team(s) needs to go through the companie's approval and review process before you start using it. To do so you need to make an request at Topdesk. Documentation on how to do so can be found here.
##Using test (scripts) from a other (dev) envirionment Sometimes it can be usefull to execute tests using tests from an other envirionment. In most cases if you need to verify if some functionality integrate correct you can use test scripts to verify that. What you can do is to merge the test scripts to your dev env in in some cases there are Release pipelines or build pipelines in DevOps to execute tests. The tests in the CICD pipelines are focust on the Fiscal products, in more detail: Base3 fiscal products.