test

Updated:2023-07-03

maia test : this command reads and executes the commands given in the section test in the component configuration file (default a MAIA.yml file). If test logs are to be posted to MAIA web app, the name of the test log files must also be specified in the file.

MAIA Agent executes commands in the following sequence:

  1. MAIA Agent runs the prepare commands the section test/prepare_cmd in the component configuration file. If the component is a collection, the tests in its sub components are prepared before the tests in the collection.
  2. MAIA Agent runs the test commands in the section test in the component configuration file (MAIA.yml). If the component is a collection, the tests in its sub components are executed before the tests in the collection.
Command printout
$ bundle exec maia test --help
Usage: test [--help] [--verbose] [--debug] [--component <str> [--track <str>]] 
[--activity string] [--activity-uuid <uuid>] [--parent-activity-uuid <uuid>] 
[--save-log] [--no-owner] [--heartbeat-interval <int>] 
[--time-to-live <int>] [--build_label <str>] [--section <str>]

Options:
    -v, --verbose                    Verbose mode
    -d, --debug                      Debug mode
    -c, --component STRING           Component to build
    -t, --track STRING               Track to build
        --activity-uuid STRING       Activity uuid
        --parent-activity-uuid STRING
                                     Parent activity uuid
    -z, --activity STRING            Activity comment (default activity-uuid)
        --time-to-live INT           Timeout (default 7200s)
        --heartbeat-interval INT     Heartbeat (default 600s)
        --no-owner                   Disable owner for an activity.
    -g, --save-log                   Save logfile locally
    -l, --build_label STRING         Build label to which log will be posted
    -e, --section STRING             Select component configuration file section to run test commands (Default: test)
        --test-label STRING          Label to identify the test activity
    -h, --help                       Show this message` (edited) 


Command details
Run command Restrictions Example
maia test None Uses a build label to post test logs referencing a specific build.
maia test --component esb-configuration --build_label OPEN_SSL-1.123-12


Option flag Description
--component, -c component name string M The name of the component in MAIA web app.
--track, -t track name string The name of the track in MAIA web app.
--build_label, -l build label string The label of the build in MAIA web app.
If the build label is not given as a part of the command and a build has been built before the test program is run, the build label will be retrieved from the file MAIA.yml.
--section, -e section string The section in the component configuration file containing the commands run by maia test.
The default section is test.



The following additional command options apply when also creating Activities in the MAIA web app.

Option flag Parameter Description
--activity, -z string C The activity comment that will be showed in MAIA web app. Default activity-uuid
--activity-uuid uuid string M The uuid of this activity.
--parent-activity-uuid uuid string The uuid of the parent activity that the build belongs to in MAIA.
--no-owner Disables the owner for an activity.
--heartbeat-interval int The number of seconds between heartbeats. Default 600 sec.
--time-to-live int The maximum timeout, in seconds, before the activity is terminated. Default 7200 sec.
--save-log, -g Saves the log file locally



The following additional command options apply to all MAIA Agent commands.

Option flag Description
--help, -h Shows all available options for the command.
--verbose, -v Enables verbose mode.
--debug, -d Enables debug mode.

Results