Skip to main content

Creating Templates

We've divided up the Templates folder into subfolders. There is one subfolder for each api controller in Utopia, and there should be, at least, one template for each endpoint in Utopia.

Templates are essentially small components that can be used to create a test.

A 'template' should at least consist of an HTTP Request with the url and body of the request configured to expect variable data. They may also have other required items like (a post processor to extract data from the response, query paramaters, special http headers, etc).

When making a template, please remove duplicated headers and all unneeded parts from a request (i.e. most of the managers and random timers can go). Most templates will consist solely of the HTTPRequest and occasionally some unique headers.

see the Parameters and Variables page for help on configuring http requests to contain dynamic data in the url
or body

BlazeMeter Recording

BlazeMeter is a chrome extension that can be used to record your http traffic in a file that can be imported to JMeter to quickly create tests.

It can be installed by visiting https://chrome.google.com/webstore/detail/blazemeter-the-continuous/mbopgmdnpcbohhpnfglgohlbhfongabi?hl=en 

Make sure to sign into BlazeMeter, accounts are free.

Edits after Recording

Delete HTTP Header Manager:

  • Left Menu (Test Plan) -> TestName (GetFileUploads) -> HTTP Header Manager -> Right Click -> Remove
    image.png

Fields:

  • Protocol [http] = ${REQUEST_PROTOCOL}
  • Server Name or IO = ${BASE_URL_1}
  • Port Number = ${SERVER_PORT_NUMBER}
    image.png
  • Path = ${TARGET_NODE_ID} (Could also be TARGET_ROLE_ID etc)
    image.png

Parameters:

  • URL Encoding = True (Checked)
    image.png

Body Data:

  • "id": or "nodeID": = "${TARGET_NODE_ID}"
    image.png
  • "parentID": = "${NEW_PARENT_ID}"
  • "name": = "${NEW_NODE_NAME}"
    image.png

Video Aids

The following a video on how to use the BlazeMeter chrome extension:

Creating a Basic Template in JMeter

The following video is a walkthrough on how to create a basic template: