Practical DDT: Randomized data scenarios in one automated test script + Continuous Testing

Introduce a practical DDT technique to have a random input data combination in one automated UI test.

Zhimin Zhan

--

This article is included in my “How to in Selenium WebDriver” series.

A reader of “Data-Driven Testing Clarified” asked me how I do DDT. The drawbacks of traditional DDT, as I put in that article, are being difficult to maintain and debug. Therefore, I will try to avoid it in practice unless it is really necessary. In this article, I will share my way to handle multi-data scenarios in one automated UI test case.

To be realistic, we cannot afford DDT most of the time

The reason is simple: execution time. We often see a long list of scenarios in manual testers’ so-called test design spreadsheet. Every row represents one data scenario and expectations.

Let’s do a quick and simple maths calculation. Supposedly on average, the execution time of a test case is 30 seconds (which is not bad for a UI test). 120 tests (i.e. scenarios) will take 1 hour. I have seen over 100 scenarios for just a single user story. In that case, how many user stories can the automated test suite realistically cover?

--

--

Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.