Define AI in test automation

Testim

Question: How do you define AI in test automation?

Insights:

I definitely see a lot of value with AI in test automation because a lot of time Automation Engineers spend is on Test Scripts maintenance. Using AI software this can be minimized a lot (for example, if UI elements changed and as a result, the existing script fails. In this case, you can ask AI to regenerate scripts with new AI and rerun..all automatically... So far, I have seen AI tools creating scripts using Xpath (which is fragile and generally not recommended in test automation). However, in the future, I am sure modern AI tools can create automation scripts using stable locators.”

As an experienced leader in the field, what’s the #1 thing you wish you could tell yourself when you first started automating tests?

Automate if it makes sense...do not just automate anything and everything that manual testers do. The second most thing I would say is " Add more Unit tests, followed by API, and lastly UI tests". If you add one additional UI test, you should feel bad about it because it requires a lot of maintenance and could be flakiness at some point.

-- Murali Tulugu

Question: what’s the #1 thing you wish you could tell yourself when you first started automating tests?

Automate if it makes sense...do not just automate anything and everything that manual testers do. the second most thing I would say is ” Add more Unit tests, followed by API, and lastly UI tests”. If you add one additional UI test, you should feel bad about it because it requires a lot of maintenance and could be flakiness at some point”.

- Murali Tulugu

Question: What learning resources can you recommend for those just starting their journey in API testing?

This is my favorite type of testing strategy because it is easy to write and maintain API Tests than UI Tests. There is a lot of value having API tests and can be run as part of the CI/CD pipeline to have fast feedback. As some of you know about Testing Pyramid in which you should have 70% if Tests should be Unit, 20% should be API and the rest of 10% should be UI. Also, another important thing to consider is the thought process of UI tester should be "how can I convert this UI test case into API test case"... and though the process of API tester should be how to convert this API test into Unit test... This is to gain more stability in the testing suite...There are multiple HTTP libraries out there..my favorite in Java is RestAssured.

- Murali Tulugu

Question: If you have a limit on the amount of test executions that can be run, what is good general advice on how to prioritize them?

If you are talking about Tests under Testing pyramid, Unit tests (70%), API (20%) and UI (10%). If the context is about UI tests then I would say "Limit your automation tests for smoke/acceptance (easy to automate, always runs and takes less time to automate). Remember that more automation scripts do not give you any additional benefit. Rather having green builds (100% Pass) give you some confidence.

- Murali Tulugu

Question: How to create test data?

Regarding the question on Data Creation. Yes, the best practice is "Use Just In Time" data...which means take data as it exists from API rather than hardcoding in property files or JSON files. This saves a lot of time and ultimately reduces test data maintenance. For this, you may have to ask your Dev Team to expose some internal endpoints to create such data on the fly.

- Murali Tulugu

Question: what are good coding practices that you would recommend following while writing test cases for automation?

The same coding practices as Developer follow especially creating Pull Requests, peer coding, and having static code analysis tools (such as SonarCube). Right now, I see most of the testing Teams do not follow these coding practices. This adds more maintenance time for your automation teams. So, my advice: Talk to your development team and follow the same guidelines as they follow. Treat Automation code as Production code is the best advice I could give in this regard.”

- Murali Tulugu

Last updated