How to conduct data-driven test with Scandium

A data-driven test in software testing refers to a testing approach where test scripts are designed to run with a variety of input data sets. Instead of having fixed, hard-coded values in the test scripts, the input values and expected outcomes are stored in external data sources, such as spreadsheets or databases. The test script is then executed iteratively, each time using a different set of input data from the external source.

Data-driven testing is commonly used in regression testing, where a set of test cases needs to be executed with different data to ensure the continued functionality of the software as it evolves over time. Data-driven testing is also referred to as parameterized testing.

Key Characteristics of Data-Driven Testing

  1. Parameterization: Test scripts are written to accept parameters, and these parameters are filled with data from external sources during test execution.
  1. Variety of Test Data: The same test script is executed multiple times with different sets of input data to ensure that the application behaves correctly under various conditions.
  1. Efficiency: Data-driven testing helps to improve testing efficiency by eliminating the need to create separate test scripts for each set of test data. Instead, a single script can be reused with different data sets.
  1. Scalability: It is particularly useful for scenarios where there are a large number of test cases with similar logic but different input data.
  1. Maintenance: Changes to test scenarios or data can be handled more efficiently as modifications can be made in the external data source without altering the test script.

Steps to Follow to Conduct Data-Driven Testing with Scandium

Step 1: Visit https://getscandium.com. Create an account or log in if you already have one.

Step 2: Once on your dashboard, create a new folder and give it a name.

Step 3: Click on “New Test” to create a test, and provide a name for your test.

Step 4: Input the URL of the website you want to test and click on “record.”

Step 5: To test the login flow. When on the login page of the website, enter the necessary credentials like the username and password. Then, click on the “login” button.

Step 6: Once you have successfully logged in and reached the website’s homepage, validate the homepage by clicking on the green “check” button to make an assertion.

Step 7: Click on “Click here, then click on the element on the page,” and select any element on the homepage to validate it.

Step 8: Under Command, choose the option “Element should be visible” and click on “Save assertion.”

Step 9: Stop recording and click on the Save button.

Step 10: Next, create a “csv” file, possibly using Google Sheets.

Step 11: Label two separate columns on the sheet as “Username” and “Password.” Input the available variables for each category in their respective columns.

Step 12: When inputting variables, intentionally leave one or two data entries as incorrect, like a wrong password.

Step 13: Name your spreadsheet and save or download it as a “.csv” file.

Step 14: Return to your Scandium dashboard. Locate and click on the “Settings” icon.

Step 15: Click on the data source, then on the “upload file” button. Upload the saved spreadsheet and click on save.

Step 16: Once saved, go back to your test.

Step 17: Identify the fields you want to parameterize. Click on the “+” icon to expand options.

Step 18: Under the “Type Username field,” after expanding options, click on the settings icon. In the settings tab, clear the entry in the “Text to Assign” dialogue box, then click on “Insert variable” and choose “external file” for the username field.

Step 19: Repeat the process for the password. Click on the “save” button.

Step 20: Click on “run,” and Scandium will execute your test for all variables in the uploaded spreadsheet.

Step 21: Check the results of your test in “Suite Runs.”

With these steps, you’re all set. Head over to Scandium now and begin automating your tests for speedy delivery.