Sonar for test automation
Like a healthy doctor can treat you well and make us healthy .
In the same way the code written to test another code must be itself healthy.
In the case of most teams the automation fails not because due to the product being unstable. But rather than that it fails because the automation code written does not follow proper coding standards.
Some points that cause trouble for most of the automation suite:
- Improper naming conventions.
- Hardcoded test data.
- Using lot of thread.sleep
- using system.out.println for the debug purpose.
Now if the coding standards are being followed from the very beginning and to the precision where we even consider how a variable is being named and what access modifier is being used. Then following benefits can be seen :
- Code is more maintainable. So even if flow changes script level changes take less time.
- Using less printconsole makes suite less time consuming.
- Proper naming conventions helps a new guy to work on the script with utmost ease.
These two links below sight the same point.
Do let me know your views on the same.
Thanks,
Akash