Skip to content

template

The template command loads and resolves the configuration (anchors, placeholders, overwrite files) and prints the final merged configuration. Useful for verifying what the runner will actually see at execution time.


Positional Arguments

Position Property Source Type Required Default Value Type Description
0 ConfigurationFile Base options Yes test.qaas.yaml string Path to a qaas yaml configuration file to use with the command.

Flags

Flag Inherited Required Default Value Type Description
--assertion-categories Yes No [] string list Used to filter the assertion categories to run. The sessions that are associated with assertions will run too.
-a, --assertion-names Yes No [] string list Names of the assertions to run. Only sessions given to those assertions will run.
-c, --cases Yes No string Name of the folder containing all the different .yaml case files that cases are ran with, If no folder is given will run the .qaas.yaml file as is without cases.
--cases-name-patterns-ignore Yes No [] string list Regex patterns of test-case names to ignore.
-n, --cases-names Yes No [] string list Names of the test-cases to run.
--cases-names-ignore Yes No [] string list Names of the test-cases to ignore.
--disable-elastic-defaults Yes No False bool Disables Elastic defaults registered through the runtime defaults provider for this run.
--elastic-password Yes No string Optional Elasticsearch password for the logger sink.
--elastic-uri Yes No string Elasticsearch URI used by the logger sink when send-logs is enabled.
--elastic-username Yes No string Optional Elasticsearch username for the logger sink.
-g, --logger-configuration-file Yes No string Path to a logger's configuration file, will override the default logger's configuration. Its level can be overridden by the logger-level flag.
-l, --logger-level Yes No LogEventLevel (optional) The logger's level, overrides both the default logger's level (Information) and the level of any logger's configuration given.
All available options (not case sensitive) are: Verbose, Debug,
Information, Warning, Error, Fatal.
--no-env Yes No False bool When this flag is used environment variables will not override loaded configurations.
--no-process-exit Yes No False bool When this flag is used the runner will not terminate the current process after it completes. Useful when embedding QaaS.Runner and orchestrating multiple runners in a single host process.
-r, --overwrite-arguments Yes No [] string list List of arguments to overwrite the qaas configuration with, The first argument overwrites the qaas configuration and then the one after it overwrites the result and so on...
See example below.
-p, --push-references Yes No [] string list References to push onto the qaas configuration.
References are configurations that are pushed in the completed test case's root level list configurations instead of a certain keyword to replace,
if such a keyword is not found for a certain list nothing will be added to it.
The items added to the configuration list will have a prefix of the given keyword to replace added to their unique name field.
See example below.
--resolve-cases-last Yes No False bool When this flag is used cases will be resolved after all other types of configuration resolutions, instead of its default behaviour which is after overwrite files and before references.
--send-logs Yes No False bool Whether to send logs to the configured Elasticsearch sink.
--session-categories Yes No [] string list Used to filter the session categories to run.
-i, --session-names Yes No [] string list Names of the sessions to run.
-w, --with-files Yes No [] string list List of files to overwrite the qaas configuration with, The first file overwrites the qaas configuration file and then the one after it overwrite the result and so on...
-f, --with-folders Yes No [] string list List of folders whose yaml files overwrite the qaas configuration in alphabetical order, after overwrite files and in the order the folders are given.

Flag Examples

Example -r

-r Path:To:Variable:To:Overwrite=NewVariableValue

Example -p

If we push the reference below reference.yaml

Sessions:
  - Name: A
  - Name: B
On the configuration below test.qaas.yaml
Sessions:
  - Name: First
  - ReplaceKeyWord
  - Name: Seconds
With the replace keyword ReplaceKeyWord we will get the following results:
Sessions:
  - Name: First
  - Name: ReplaceKeyWordA
  - Name: ReplaceKeyWordB
  - Name: Seconds
The syntax to add a reference is: -p KeyWordToReplace Path/To/Reference.yaml PathToReferenceOverridingFiles.yaml To add multiple references you can invoke the -p flag multiple times or use a single -p flag with references separated by the keyword: -p KeyWordToReplace1 Reference1.yaml -p KeyWordToReplace2 Reference2.yaml or -p KeyWordToReplace1 Reference1.yaml KeyWordToReplace2 Reference2.yaml Note that the KeyWordToReplace must not end with the suffix .yml or .yaml.