modality execute

Command: modality execute <script> <--objective-file <objective file> | --objective-name <objective name>>

Run generative testing guided by an objective. This command will repeatedly call the provided per-test-case script until one of the stopping conditions in the given objective is met. The objective's measurements will be taken after each script execution.

# Example

$ modality execute --objective-name example-objective --disable-script-io-inherit ./stimulus.sh
┌─ Objective Status ─────────────────────────────────────────────────────┐
│                                                                        │
│  Objective:   example-objective                                        │
│  Instance:    1                                                        │
│  Created At:  2021-04-21 21:55:24 UTC                                  │
│  Created By:  example-user                                             │
│  Stopped At:                                                           │
│  Cycle Count: 0                                                        │
│                                                                        │
├─ Stopping Conditions Progress ─────────────────────────────────────────┤
│                                                                        │
│  Time:                 00:00:00 / 00:02:00   [                  ] 0%   │
│  Passing Measurements: 0 / 15                [                  ] 0%   │
│  Failing Measurements: 0 / 5                 [                  ] 0%   │
│                                                                        │
└────────────────────────────────────────────────────────────────────────┘

# Options

<script> - Script to exercise your system, to be run each test case. This script is responsible for performing any necessary system setup and/or teardown. In addition, this script should execute whatever test scenario you are interested in. It should call modality mutate at the appropriate time to inject a mutation, usually with the --objective-name option so the mutation is guided by the objective you are executing. See Write a Per-Test-Case Script in the Run Generative Tests guide for more explanation and an example.

--objective-file <objective file> - Path to an objective definition file. The objective will be created and applied to the current session. Mutually exclusive with --objective-name.

--objective-name <objective name> - Name of an existing objective to use for measurements and stopping conditions. Mutually exclusive with --objective-file.

--disable-script-io-inherit - Don't inherit the user stimulus script stdout and stderr.

--disable-status-output - Don't show the objective status summary information while iterating.

--stopping-condition <stopping condition> - Use the provided stopping condition(s) in place of the general stopping conditions defined in the objective. This option can be provided multiple times. Note: If the --stopping-condition option is supplied, the stopping conditions in the objective’s definition are ignored.

--using <session name> - Use the given session rather than the default one.