When users open software solutions, they expect them to function as needed. For example, when a business analyst opens Excel, they hope to work with data without requiring knowledge of what’s happening with the application internally. If something breaks, they won’t...
What is data-driven testing?
The ability to do data-driven testing is one of the key benefits of test automation. In data-driven testing, an automated test case retrieves input values from a data source such as an Excel spreadsheet or a database file. The test case is repeated automatically for each row of data in the data source. So, instead of 10 testers having to manually execute test cases for 10 different data values, and determine whether or not each test case succeeded, an automated test can execute 100 test cases in a single test run.
In a test case for a user registration process, the data source might contain the columns and rows like those shown below:
First Name | Last Name | Desired User Name | Desired Password | Expected Result |
John | Jones | jjones14 | Mypass123 | Pass |
Jody | Jones | jjones14 | Mypass456 | Fail |
Julia | Jones | jjones15 | mypass | Fail |
Input 1 | Input 2 | Expected Result |
12 | 12 | 144 |
15 | 50 | 750 |
-1 | 18 | -18 |
Benefits of data-driven testing
Reduced execution time
Increased accuracy
Improved use of system and human resources
Reduced test case maintenance
Better test data storage
Supports more than just testing
Best practices for data-driven testing
Separate test data from the test code whenever possible
Use realistic data
Use setup/teardown modules
Configure error handling
Watch our on-demand webinar
Mastering Data-Driven Testing: If you prefer video instructions, you can also watch our on-demand webinar. Learn how to set up variables and link them to data sources. You will also learn how data binding connects variables to data items, how to control execution with conditions and how to pass values through module boundaries and across test cases.
Related Posts:
Effective Black Box Testing Methods You Need to Try
When users open software solutions, they expect them to function as needed. For example, when a business analyst opens Excel, they hope to work with data without requiring knowledge of what’s happening with the application internally. If something breaks, they won’t...
Benefits of Using the Top BDD Testing Tools
Explore the most popular and best types of BDD testing tools available for developers across different programming languages and development platforms.
8 Steps to Create a Data Migration Plan
When companies change systems or move information to a more secure location, they typically need to perform a data migration. If a company wants to use cloud-based solutions, it must transfer existing information from localized hardware to a cloud environment. A...