Using built in libraries

GET https://postman-echo.com/get?randomName={{$randomFirstName}} {{$randomLastName}}&randomAddress={{$randomStreetAddress}}&randomDate={{$randomDateRecent}}

This request shows an example of using some of the external libraries that are built into the Qodex testing sandbox. You don't need to specifically import them from outside sources, but you will need to make use of the require method to use the functionality.

The libraries shown in this request include:

  • Faker.js in the params tab of the request, used to generate fake data.
  • Lodash in the Tests tab of the request, which is a JavaScript library providing utility functions for common programming tasks.
  • Moment.js in the Tests tab of the request, which helps format and display dates in JavaScript.
  • querystring module in the Tests tab of the request, which provides utilities for parsing and formatting URL query strings.

For more information on using built-in external libraries, check out [the documentation] a full list of supported libraries and modules.

Request Params

KeyDatatypeRequiredDescription
randomNamestring
randomAddressstring
randomDatestring