Skip to main content

Opening from the CLI

Typically, the recommended way to open the Cycle Report Dashboard is from the Cycle Desktop IDE. However, there may be cases when you need to open it from the command line interface (CLI) instead.

For example, when running tests from the Cycle CLI in a Continuous Integration (CI) system, you may want to review test results in the Report Dashboard after they have completed. To do this, you could:

  1. save the test result database file after tests finish running
  2. download the database file to your local machine
  3. launch the Report Dashboard from the CLI with the database file

When running the Report Dashboard from the CLI, it cannot receive new test results from live tests. It can only display results in a saved database file.

Saving the test result database file

When running tests via the Cycle CLI, include the --db-file-output-directory argument to specify a output path for saving the test result database file. For example:

cycle-cli --db-file-output-directory /path/to/output/directory mytests.feature

The Report Dashboard saves the test results file as a SQLite database file in the given output directory. The name of the database file will be results-<uuid>.db, where <uuid> is a randomly generated Universally Unique Identifier.

The database file must be set explicitly at the time the tests are launched. It cannot be set or accessed after tests have started. If the database file is not explicitly set, then it will automatically be deleted when tests complete their execution.

Launching the Report Dashboard

The Report Dashboard is active while the Cycle CLI is actively running tests. However, after the tests are complete, the dashboard will no longer be active. You will need to explicitly launch the dashboard process from the CLI to continue using the dashboard. Wait until the process exits and saves the test result database file before attempting to start the dashboard from the CLI.

Launching with saved results

The executable for the Report Dashboard is located under the Cycle installation folder at .\Cycle\cycle-result-service\cycle-result-service.exe. When launching the executable, include the -db-file argument to set the saved test result database file. For example:

.\cycle-result-service.exe -db-file results-<uuid>.db

The dashboard will remain active for as long as this process is running. Enter Ctrl+C at the command line to kill the process.

Adding other command line options

Use the -help argument to view all available command line options:

Usage of cycle-result-service.exe:
-db-file string
path to database file to use (default "development.db")
-debug-mode
enable debug mode for gin server logging (default true)
-journal-mode string
journal mode for sqlite (default "WAL")
-log-file string
path to log file to use
-output-directory string
directory to copy the db file to on shutdown
-port int
the port to listen on (default 8080)
-purge-on-shutdown
purge the db file on shutdown
-v get cycle-result-server version

Default values should be fine in most cases, but you may need to explicitly set certain options (such as the port) for your machine depending upon your environment.