Upload request data⚓︎
The plugin is able to record web requests executed by cy.request
which can then be added as execution evidence to the test execution issue during the results upload.
Setup⚓︎
To upload your web requests and responses to Xray, you need to allow the plugin to overwrite the existing cy.request
command in your support file and enable the upload in its configuration:
By default, requests and responses are uploaded as JSON data with the following naming scheme:
type | scheme |
---|---|
request | <method> <url> <timestamp> request.json |
response | <method> <url> <timestamp> response.json |
Note
The plugin will only upload requests and responses as JSON evidence for tests that are associated with existing test issues.
But I have already had to overwrite cy.request
for other purposes?
The plugin also exports its task queue so that you can invoke it manually, rather than letting the single import override all existing cy.request
behaviour.
This also allows for customisation of evidence file names.
You can also choose to only upload responses if you wish: