Create data file Day 10 of 15days

day 10
Create data file

In the activity you request to create a data file, please can you inform us if this file has any specific format and if the data it should contain is

Params
Key, Value
testData, {{$randomCatchPhrase}}

Body
“Animal” : {{$randomAnimalsImage}}

Test
pm.variables.replaceIn(‘{{$randomColor}}’)

console.log(pm.variables.replaceIn(‘{{$randomColor}}’));

pm.test(“Status code is 200”, function () {

pm.response.to.have.status(200);

});

The first request has the random variables, catch phrase and animal and is not using a data file.

The second request uses the data file. (“httpbin with file”).

The code you have provided is for the first request.

Hint: There are two variables that you need to include in your data file.

Your data file can be a CSV.

The documentation for the course has a link to a Postman blog on how to use data files, and also a video.

Part of the training for this exercise is for you to read and understand the available resources. Not just tell you how to setup the data file.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.