Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In this post, we are going to demonstrate, how you may perform data driven testing with the help of looping feature of vREST.

Here is the video tutorial for the same:

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.

  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.
  4. That's it. You may now run the imported sample test cases.
  • No labels