Generating an Archive
Deprecation Notice
NexMock is no longer supported. Use the archive:upload command, which supports HAR, OAS, or Postman collections.
Supports the latest NexMock API and provides additional features to help you generate HAR files during CI/CD workflows with ease.
In addition, this command has the ability to split NexMock files in to multiple .HAR files. For this purpose, you can specify the --split
option, which accepts the number of pieces in to which to split.
For example:
bright-cli archive:generate --output archive.har --target url-tested-application --header "Authorization: Bearer my-jwt-authentication-token" --split 4 .nexmock
The command above creates four .HAR files that comply with following pattern: <basename>(_<number>)?.<extension>
. For example, archive.har
, archive_2.har
and so on.
Arguments
Argument | Description |
---|---|
<mockfile> | A NexMock file is obtained from the NextMock Reporters. See to E2E Guide. |
Options
Option | Description |
---|---|
--output=newArchivePath ,-f=newArchivePath | The path where the new archives are created, relative to the new workspace root. Required option. |
-target=hostnameOrIp ,-T=hostnameOrIp | The target hostname or IP address. Required option. |
--header=headerName:headerValue ,-H=headerName:headerValue | Extra headers to be passed with the NexMock file, which can also be used to remove a header by providing a name without content. For example, -H "Host:" .Warning: Headers set with this option override the archive headers and are set in all requests. |
--pool=size , -p=size | The size of the worker pool. Indicates how many requests Bright CLI can perform in parallel. Default: --pool 250 |
--timeout=milliseconds | The time to wait for a server to send response headers (and start the response body) before aborting the request. Default: --timeout 5000 |
--split=numberPieces ,-s=numberPieces | The number of the HAR pieces. Enables you to split a NexMock file in to multiple .HAR files. Default: --split 1 |
Updated 6 months ago