Page tree
Skip to end of metadata
Go to start of metadata

In this post, we are going to demonstrate, how you may perform data driven testing with the help of looping feature of vREST. We will provide the sample files needed to quickly start data driven testing.

Context: We are defining test cases for a sample Contacts Application. More specifically we are validating various scenarios of Update Contact API with the help of loop. And we are providing data to Update Contact API from a CSV file using vutil module. 

For providing data with the help of CSV file, you will need to install vutil module. vutil module converts this CSV file into JSON format via REST API. For more information, please read Fetch CSV data for data driven testing.


Steps:

  1. Download the sample CSV file and sample test cases file
    Download Data Driven Test Cases File
    Sample CSV File

  2. Import the Sample test cases file in your vREST instance
    You can import the test case file by following the steps below:
    1. In Test Cases tab toolbar, Go to "More Dropdown" >> "Import Test Cases"
    2. You will get the following modal window. Please fill the form as shown below to import the sample test cases.


      Note: If you are using Trial version of vREST then you will not be able to import the sample test case file via importer. Please contact us by sending an email to us. We will enable the Import functionality in your trial version.
  3. Configure the global variables to be used in sample test cases
    You will need to configure the following global variables:
    1. dataDir: Please provide the directory  path of sample CSV file here.
    2. vutilBaseURL: Default base URL for vutil module is provided. If you are running vutil module on a different port then you will need to change this base URL.
      Note: Please make sure that vutil server is running on your system. For more information on vutil module, please read this guide link.
  4. That's it. You may now run the imported sample test cases.
  • No labels