NEW: The configurable request pipeline allows to limit the number of HTTP requests made in parallel.
Configuration options can now also be set with environment variables (e.g.
Configuration options can now be read from multiple configuration files with the
Configuration options are now validated before running the scenario. If an option has an invalid value (e.g. unknown log level, non-numeric or negative request cooldown), the scenario will not start running.
Runtime parameters have new options:
Flag runtime parameters now have the value
false instead of
undefined if not activated.
Also, the required option has no effect on them (even if required, flag parameters can still be omitted when running the scenario).
Runtime parameter values are now displayed before running the steps of a scenario with the debug log level.
An obfuscate parameter option has been added for those parameters that you might not want to log in cleartext.
This option is turned on by default for parameters whose name contains the words
BUGFIX: the log level option could not be set in the scenario object because the command line program would always override it to the info level.
BUGFIX: the scenario listing would unnecessarily be displayed when using the run or info commands with an argument and a loading error occurred (e.g. due to an invalid scenario object).
BREAKING! Runtime parameters have been completely overhauled.
NEW: The listing sub-command lists available API scenarios in your project.
Also check out:
Custom error messages can now be specified when expecting an HTTP response to have a certain value.
HTTP requests can be run in parallel by passing them to the all method.
BUGFIX: steps were numbered starting from 2 in the command line output.
BREAKING! Request options are now merged with default request options instead of overriding them. For example, if there are headers in both the default request options and the request options, they will be merged instead of only the latter being used.
NEW: An expected status code can now be specified when making HTTP requests.
NEW: The scenario can be completed before reaching the final step with the new complete method.
Allow custom error message for required parameters. See runtime parameters.
BUGFIX: setting a base URL and providing no URL when making an HTTP request would cause an undefined string to be appended to the constructed URL.
BUGFIX: skipping a step did not work with a falsy message.
url) are now validated after request filters are run. This allows the method or URL to be set by filters.
NEW: Configuration options can be changed at runtime with the
showFullUrl option causes full URLs to be displayed instead of paths only when a base URL is configured.
BREAKING! Request filters must now return the request options object instead of modifying it by reference.
NEW: When an error occurs, set the log level to
trace to see the stack trace.
Request filters can be made asynchronous by returning a promise for the request options.
Fixed the scenario completion message.
BUGFIX: request filters did not receive the request options as first argument.
NEW: Scenario options can be given through an
api-copilot.yml file in the current working directory:
-c, --config [file]command line option sets another path for this configuration file.
run method of scenario objects returns a promise.
Process exits with status 2 if the scenario fails.
success would only forward its first argument to the next step.
BREAKING! Request filters are no longer passed a store object.
NEW: Scenario options:
logsets the log level ("trace", "debug" or "info"; "info" by default);
showTimeprints the date and time with each logs;
showRequestprints the options of each HTTP request (if the log level is debug or trace);
showResponseBodyprints the body of each HTTP response (if the log level is debug or trace).
NEW: Command line options:
-l, --log [level]sets the log level (trace, debug or info; info by default);
-u, --base-url [url]overrides the base URL of the scenario;
-t, --show-timeprints the date and time with each logs;
-q, --show-requestprints the options of each HTTP request (if the log level is debug or trace);
-b, --show-response-bodyprints the body of each HTTP response (if the log level is debug or trace).
The body of HTTP responses is now hidden by default. Use the new
showResponseBody scenario option or the
-b, --show-response-body command line option to print it.