Cycle-CLI (Command Line Interface) execution

Cycle allows the ability to run a Feature File or Playlist from the command line. Combining this functionality with Windows Task Scheduler allows you to execute the tests at a preset or recurring time.

To execute Cycle from the command line:

  1. At the command prompt, navigate to the directory where the cycle-cli.exe file is located (typically C:\Program Files (x86)\TryonSolutions\Cycle).

  2. Run cycle-cli followed by any optional parameters, with the last parameter being the name of the Feature File or Playlist to be executed.

Example: cycle-cli output=C:\Cycle\Output failfast=true C:\Cycle\Example.feature

Note: If your Feature File loads a dataset or performs image matching, you will need to set your Resource Directory as described below. Also, if your Feature includes steps that prompt the user, these steps will be skipped.

Required parameters

Parameter Description Example
Feature or Playlist Path to Feature File or Playlist ```C:\path\to\feature\feature_name.feature``` or ```C:\path\to\playlist\playlist_name.cycplay```

Optional parameters

Parameter Description Example
Resource Resource Directory ```resource=C:\path\to\resources```
Output Output Directory ```output=C:\path\to\output```
Tag Tags ```tag=tag1 tag=tag2```
Extension Extensions Directory ```extension=C:\path\to\extension.jar```
Log Trace Starts a log trace for more detailed information; values are: TRACE, INFO, DEBUG or ERROR ```log=TRACE```
Personal Access Token Used for scheduling a CycleCMD job ```token=abcd1234-abc-5432```

Note: If your account is going to be used to schedule a job using CycleCMD, a Personal Access Token(PAC) is required. A PAC can be obtained under the account page in the User Portal. You can view your Personal Access Token by clicking the 'Generate' button.

Cycle-CLI results

When Cycle-CLI executes, the Step results are output to the command line. Steps that pass are output with a Pass and the number of ms they took to complete. Steps that failed are output with [Fail]. Cycle-CLI completes with the line Feature: Feature Name [Fail]/[Pass] - {number} ms.

Both the HTML Report and the Email Summary Report will be generated if the respective settings are applied.

Replicating Settings

In many cases, Cycle-CLI is run on a different computer than Cycle itself. It is important for teams to carefully control what settings are in use when running Cycle-CLI. It is possible to replicate the needed settings by copying and pasting the desired settings.json file to the appropriate directory wherever Cycle-CLI is running.

The settings.json file is usually located at C:\Users\username\AppData\Roaming\Cycle\config\settings.json. If for some reason that file path does not work, an easy way to identify the location of the settings.json file is to open the Step Guide from the Cycle application, and note the file path that is displayed in the browser. The config folder containing the settings.json file is in a sibling directory to the \documentation folder.

results matching ""

    No results matching ""