We're here to help

Read test step

The Read test step reads the contents of a file or URL and stores it in a variable. It supports the encoding below to read the files. 

  • Default
  • ASCII
  • UTF-8
  • UTF-16
  • UTF-16 BE
  • UTF-16 LE
  • ISO_8859_1

 

Note: UTF-8 is widely used because it supports different language characters which are non-English.

 

Example use cases


  • Read a local file (e.g. .testproject) to store all of the content in one variable and then parse that information to later fetch it in connection details
  • If you have reference data (such as an Excel document with customer data) that you need to create an environment, you can easily modify that information within Excel and then later read the data from that file into your environment

 

How to use a Read test step


Step 1: Create a test case. 

Step 2: Drag and drop the Read test step from the Test Palette.

Step 3: Provide the file path or URL from which the content is to be read. The file can be .txt, .xml, .log, etc.

Step 4: Choose the format as per the file.

Step 5: Select the desired character encoding scheme.

Step 6: Provide a result name. It is set to Contents by default. 

Step 7: Execute the test case.