Here at mabl, we are always thinking about better ways to help you increase your test coverage. We believe that test creation should be seamless and tests should evolve alongside your app. As the scenarios available to your users become more complex, mabl simplifies the process of creating tests that are both reusable and versatile.
Data-driven testing is one of the most powerful tools in your regression testing toolbox. In minutes, you can increase the coverage that an automated test provides by an order of magnitude; just replace your hard-coded values with variables, link the test to a datatable, and let mabl handle the rest. Let’s walk through a simple example.
Let’s begin with a test that visits a website and searches for jobs using a hard-coded keyword, “engineer”, and asserts that there should be some number of openings.
While this is a good start, there are other job openings available here. I’d like to verify that the search page works with different types of openings, not just “engineer”, without creating a new test for each type.
I start by creating a new variable, “Job_Type”, which I’ll set via a new data source.
Next, I edit the step that enters the text to use the new “Job_Type” variable rather than the existing hard-coded string and save the test.
Finally, I run the test using the new datatable.
In practice, your scenarios are probably more complex. Fortunately, you can extend your test and datatable to parameterize additional steps. You can also reuse datatables across many tests and even upload your existing data.
As always, we recommend starting simple and adding more power from there. Whether you’re a seasoned automation engineer, a QA engineer, or a manual tester making the transition to low-code test automation, we hope this example helps you get started on the path to improve coverage by integrating data-driven testing into your regression suite.
Sign up for a free trial of mabl to get started building your data-driven tests today.