Generating an Archive with NexMock
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 |
---|---|
| The path where the new archives are created, relative to the new workspace root. |
| The target hostname or IP address. |
| 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,
|
| The size of the worker pool. Indicates how many requests Bright CLI can perform in parallel.
|
| The time to wait for a server to send response headers (and start the response body) before aborting the request.
|
| The number of the HAR pieces. Enables you to split a NexMock file in to multiple .HAR files.
|
| Specifies the path to the configuration file. By default, the CLI tries to discover the config in package.json in the root directory of your application or a separate file by a specified name in the working directory. For details, see Configuration Files for more information. |
| Allows setting the level of logs to report. Any logs of a higher level than the one specified are shown. The options to select : 0, 1, 2, 3, 4, "silent", "error", "warn", "notice", and "verbose".
|
Updated 19 days ago