Cut down Pesticide Paradox in your test automation

Sajitha Pathirana
Webtips
Published in
3 min readDec 4, 2021

Let’s first see what is pesticide paradox is. I have extracted the definition and explanation from the ISTQB foundation level syllabus.

Photo by Arjun MJ on Unsplash

“If the same tests are repeated over and over again, eventually these tests no longer find any new defects. To detect new defects, existing tests and test data may need changing, and new tests may need to be written. (Tests are no longer effective at finding defects, just as pesticides are no longer effective at killing insects after a while.) In some cases, such as automated regression testing, the pesticide paradox has a beneficial outcome, which is the relatively low number of regression defects.”

In other words, repeating the same test over a long time would stabilize the application since we have been finding issues and fixing them for a long period of time.

This is going to be a discussion on how to reduce the pesticide paradox in test automation. In other words how to avoid running the same tests over and over again. The same test could be defined as the same functionality tested with the same data set and could be at the same time. What we are differing here is the time of execution, data set used for the execution, and finally enhancing the combinations by mainly introducing more data set to each test.

Use dynamic data rather than static data

When you are developing your test scripts, plan to rely on dynamic data rather than static data where possible. There can be points where you can generate data while running your tests rather than just using the same data set over and over again.

Hence each time the test you perform is different from the test you performed earlier and it helps to reduce the risk of pesticide paradox.

You may need a rich API to generate test data dynamically or you may need to write some helpers to generate the data required with the right constraints.

Change your execution time

If you are running nightly scheduled tests, change the scheduled time of the execution trigger so that it executes in a different time slot compared to the earlier. Running in a different time slot of the day would bring you any issues pertaining to…

Sajitha Pathirana
Webtips

A Test automation enthusiast, passionate to help the teams to enhance their testing journey with his decade of experience in the field.