The Muse Automation Framework was designed to integrate easily into CI/CD tools via the command-line (CLI) distribution. The CLI distribution is available for download from the website.

Reporting

The JUnit plug-in will generate a JUnit-compatible report file (XML) that most tools can read.

Diagnostic files

muse.log file

The framework logs some diagnostics to the muse.log file, which will be found in the users home/.muse folder.

To redirect this to stdout, a logback configuration file can be provided via a command-line option to the JVM, with an example shown below. The parameter can contain a URL or file path.

-Dlogback.configurationFile=file:///C:/Temp/log-config.xml

However, the Muse command-line distribution cannot pass JVM options via the command-line. The above example only works if you are working from a Java development environment. When you are using the Muse command-line distribution, you must edit the start script in the /bin folder.

In the muse.bat script, edit the DEFAULT_JVM_OPTS line. In this example, it is referencing a config file placed in the same folder (a full path to a file located elsewhere will also work, as will a URL, according to the logback docs).

set DEFAULT_JVM_OPTS=-Dlogback.configurationFile=log-to-stdout.xml

Similarly, in muse shell script, editing the DEFAULT_JVM_OPTS line would look like:

DEFAULT_JVM_OPTS="-Dlogback.configurationFile=log-to-stdout.xml"

Here is an example of a logback config file that sends all log messages to stdout:

<configuration>
  <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">

    <encoder>
      <pattern>%date %level [%file:%line] %msg%n</pattern>
    </encoder>

  </appender>

  <root level="debug">
    <appender-ref ref="CONSOLE" />
  </root>
</configuration>

Event logs and other results

When plug-ins log data (event log, task result, etc) they get the location from the Local Storage Location plug-in. Configure that plug-in to put the files in the desired location (or consult that plug-in to find them!).

This design isolates the data from each task that runs, so that each may be analyzed independently. Sometimes, however, it might be useful to redirect the event logs to standard out (stdout) when diagnosing problems with the test environment. This can be done with a change to the Event Log Writer plug-in in the project by turning on the "Log to stdout" option.

Handling multiple environments

A common requirement is to support multiple environments, such as automation development environment and an automation deployment environment. The most common scenario is a desktop GUI environment where MuseIDE is used to build automation tasks and a headless server environment where automation is executed (such as a CI/CD server).

The flexibility inherent in the Muse framework means there are many ways to handle these problems. They all revolve around using values sources to access system environment variables to set options that control how the test runs. Specific approaches are outside the scope of this document, but these topics may be helpful:

Related information: