Mesmer logo

Mesmer CLI

Install Mesmer CLI
Version: ...

Quick start

To get started using the CLI, first, sign in to your Mesmer tenant with an email and password:

# If the URL of your web console looks like https://some-tenant.mesmerhq.com/home/ :
$ mesmer auth login some-tenant.mesmerhq.com

─── Sign In
    some-tenant.mesmerhq.com
    Email: william.goodall@mesmerhq.com
    Password [hidden]: [hidden]

 ✓  Authenticated as William Goodall

Once you've created a project and uploaded your first build through the web UI, you can tie your working directory to a Mesmer project with mesmer init:

# Show a project picker, and create a `.mesmer.yml` file in the
# current directory with the project and tenant you choose.
$ mesmer init
Select a project: Calculator
 ✓  Created `.mesmer.yml` in "/your/working/directory"

This will create a file, .mesmer.yml, in the current directory. Any time you run mesmer from inside this directory, it'll pick up the right tenant and project ID. It's intended that you check this file in to Git, and version it alongside your app's code.

Check everything works, with mesmer project describe:

$ mesmer project describe
Name ..... Calculator
Type ..... Android
Package .. com.google.android.calculator

 Project ID  5ee00107f73ce45ba4d041e8

Then, you're pretty much off to the races. Check out the guides section for some useful recipes, and the command reference for detailed documentation on each subcommand.

Changelog

v0.42.0

  • Fix parse issue on optional build configuration field

v0.41.0

  • Fix parse issue while authenticating SSO users

v0.40.0

  • Fix documentation of 'mesmer data' to reflect removed data-updating features
  • Clarify output of 'mesmer util env'

v0.39.0

  • Fix several parse errors withing step-level test results

v0.38.0

  • Fix a parse error in crawl history where the test device is sometimes null

v0.37.0

  • Fix a parse error in build description

v0.36.0

  • Update CI integration documentaion for clarity
  • Fix a parse error for detailed test results involving failed long-taps

v0.35.0

  • Deprecate --no-a11y. A11y audits are disabled by default, and enabled with the --a11y flag.
  • Deprecate --devices; the option is now ignored.

v0.34.0

  • Remove old test data support, add mesmer data describe to list all test data
  • Add support for selecting a11y audit for individual crawls with --a11y-audit <id>
  • Add support for selecting test data for individual crawls with --test-data <id>

v0.33.0

  • Implement --no-wait flag on crawl start
  • Fix a parse error for device resolution in crawl history

v0.32.0

  • Implement mesmer crawl history
  • Update the logic used to determine when a build is done uploading and ready to install

v0.31.0

  • Switch to rustls instead of system TLS backend (libssl, stunnel, et al). Note that rustls is still configured to read the system certificate store.
  • Support new API schema for wrapped builds

v0.30.0

  • Implement mesmer test tag
  • Add support for HTTPS_PROXY, certificate trust override.
  • Allow build deletion for projects without test cases
  • Show all test runs in mesmer test detail
  • Validate auth tokens locally before use
  • Fix issue where a11y results weren't polled to completion
  • Fix issue where certain paginated responses would be truncated
  • Fix issue where mesmer test wait would poll indefinitely with subset test runs
  • Fix parse error for long-press end coordinates
  • Fix parse error with test screen images
  • Fix parse issue for testcase detectElementAtReplay field

v0.29.0

  • Fix parse error with 'killApp' test steps
  • Include request URL in malformed-response errors

v0.28.0

  • Clarify documentation placeholder for argument ID types

v0.27.0

  • Reduce default crawl duration to 45 min

v0.26.0

  • Pass through individual network errors in ('auth list')
  • Implement 'mesmer a11y wait' to wait for an a11y crawl result

v0.25.0

  • Add signedURI attribute for screenshot images in mesmer a11y describe

v0.24.0

  • Implement long-lived token authentication
    • If the backend supports it, issue (or reissue) a long-lived account token when you run mesmer auth login
    • Keep support for temporary (1-day) logins with a session token, if we can't get our hands on an account token.
  • Change mesmer auth login --tenant <tenant> to mesmer auth login <tenant> for consistency with the rest of the CLI
  • Add mesmer auth remove to delete a saved credential

v0.23.0

  • Fix parse issue with errored a11y results
  • Restrict build uploads to supported formats (.apk, .ipa, .zip)

v0.22.0

  • Pass through detailed violation attributes on 'a11y describe', such as activity and fragment class.

v0.21.0

  • Fix parse failure deleting builds
  • Improve 'not found' errors in several places

v0.20.0

  • Accept multiple arguments to 'test stop', 'crawl stop'
  • Fix parse issue when stopping an already-stopped crawl

v0.19.0

  • Fix regression in a11y describe due to API change

v0.18.0

  • Support device RELEASING status
  • Ensure builds install correctly after upload
  • Documentation layout fixes

v0.17.0

  • Fix regression in build uploads (due to API change) where newly-uploaded builds did not show up in build list.

v0.16.0

v0.15.0

  • Add a11y support: ability to start audits, gather audit results, and inspect policies
  • Add support for gathering step-level test results

v0.14.0

  • Update due to changes in API

v0.13.0

  • Implement 'mesmer device jobs' to view job queue
  • Implement 'mesmer data fetch' to get test data
  • Clarify logic for selecting compatible test devices: by default, tests will run on any compatible device, and manual selections will now include devices-in-use (spilling into the queue if necessary).

v0.12.0

  • Implement 'mesmer data schema' to get test-data schema
  • Implement 'mesmer data apply' to update test data in a project
  • Implement 'mesmer data create-example' to template out example test data.
  • Fixed bug where --json required you to pass it a value
  • Improve the CI guide documentation with more clear configuration advice, and with instructions on using the test data subcommands.

v0.11.0

  • Fixed parse failure when describing unexecuted test case.
  • Fixed parse failure for projects with associated device containing no udid field.

v0.10.0

  • Implement 'mesmer project update' to rename a project.
  • Implement 'mesmer crawl wait' to wait for crawl results.
  • Include each screen's type in description of crawl

v0.9.3

  • Fix the (23) Failed writing body error in the macOS install snippet, running on bash 3.2.

v0.9.2

  • Create install.ps1 install script for Windows.

v0.9.1

  • Statically link Windows binaries, avoiding VCRUNTIME140.dll not found errors when the user doesn't have the VC++ runtime installed.

v0.9.0

  • Implement install scripts (via curl | bash) for Linux and MacOS. This also solves problems with Gatekeeper and notarization on macOS.
  • Improve error handling for permission failures when installing updates. You'll now get prompted to run under sudo.

v0.8.0

  • Implement '-y' flag and interactive confirmation for mesmer version update
  • Refactor to reduce unhandled errors
  • Enable usage without .mesmer.yml for commands that don't require a project, like mesmer device list

v0.7.0

  • Implement test skipping, --test-devices, --tags for mesmer submit.
  • Improve documentation of mesmer init
  • Clarify usage of --tenant in the docs.
  • Send User-Agent and X-Mesmer-Cli-* family of identifying headers with every request.
  • fix: error parsing when logging in to a user without an avatar
  • Create this changelog!

v0.6.0

  • Render TUI prompts for selecting tenants and projects.
  • fix: error parsing stats field of TestResponse.
  • fix: respect global --batch option.

v0.5.0

  • Move long names to the last column in mesmer test list and mesmer test results.
  • fix: erratum describing mesmer init in project.md.

v0.4.0

  • Create this documentation!
  • mesmer submit: include buildId and crawlId in the output.

v0.3.0

  • Check for updates in the background for every long invocation.
  • Implement --devices argument for mesmer test.
  • Implement mesmer test wait.
  • Implement mesmer test browse and mesmer crawl browse.
  • fix: add rebooting device status.

Configuration

Most options in the CLI can be set a few different ways---some through command-line parameters, others through environment variables, and others in configuration files.

Context

Most commands need to know three pieces of context to run:

  • Your Mesmer tenant (e.g. your.tenant.here.mesmerhq.com)
  • Your project ID (like 5e8db6d8b67fb86e9ccb8bad)
  • Your authentication token

Almost every command needs to know your tenant and auth token; most need to know your project.

Generally, the CLI can figure these out from your configuration files and environment. If it can't, and you're running interactively, it will generally prompt you to pick from a list of possibilities. Sometimes, it can't figure out what value to use, and requires one to be passed explicitly with a global option.

More precisely, it will follow these rules when trying to resolve tenant, project, and auth token:

Resolving tenant

To resolve your tenant, the CLI will check the following places, in this order:

  1. First, if an auth tenant is specificed via a global override (the MESMER_TENANT environment variable or --tenant global option), it'll use it.
  2. Otherwise, if we can find a .mesmer.yml file, use the value from that. You can create this file with mesmer init.
  3. Otherwise, if you're authenticated to exactly one tenant, use that. (see: mesmer auth list)
  4. Otherwise, (and only if we're running interactively), render a list prompt for all the tenants in your authentication config.

If none of these steps work, the CLI will exit with an error.

Resolving project

To resolve your project, the CLI will check the following places, in this order:

  1. First, if an auth tenant is specificed via a global override (the MESMER_PROJECT environment variable or --project global option), it'll use it.
  2. Otherwise, if we can find a .mesmer.yml file, use the value from that. You can create this file with mesmer init.

If none of these steps work, the CLI will exit with an error.

Resolving the auth token

To resolve your auth token, the CLI will check the following places, in this order:

  1. First, if an auth tenant is specificed via a global override (the MESMER_AUTH_TOKEN environment variable or --token global option), it'll use it.
  2. Otherwise, it will resolve your tenant, and use the appropriate token for it from your authentication config.

Configuration files

The CLI stores its global configuration, such as authentication information, in a place that makes sense for your platform:

PlatformLocation
Linux$XDG_CONFIG_HOME/mesmer, or $HOME/.config/mesmer
macOS$HOME/Library/Preferences/mesmer
Windows%appdata%\mesmer

Throughout the docs, we'll refer to this location as the 'config directory', $CONFIG_DIR, or similar.

Authentication config

The file $CONFIG_DIR/auth.yml contains stored tokens for each tenant you're authenticated to. You can view its contents, and check token validity, with mesmer auth list

Here's an example of what this file looks like:

# auth.yml
---
# `tenants` contains a list of tenant URL/token pairs for all the
# tenents you have signed in to. You can check that these credentials
# work with `mesmer auth list`.
tenants:
  - tenantUrl: your-tenant.mesmerhq.com # The hostname of a Mesmer tenant
    token: auth.token.here # A valid auth token for that tenant

Project config

For each project, mesmer init writes out a file .mesmer.yml containing tenant and project IDs. This is intended to be checked in to version control, and versioned alongside your app's code.

Here's an example of what this looks like:

# .mesmer.yml
---
# a Mesmer project ID
projectId: 5ee00107f73ce45ba4d041e8

# Hostname of the Mesmer tenant for that `projectId`
tenantUrl: your-tenant.mesmerhq.com

Configuring a Proxy

The Mesmer CLI can be configured to use an HTTP proxy to connect to the Internet.

  • Set the HTTPS_PROXY environment variable to the proxy server you want to use
  • If this server presents an untrusted certificate, you can force the CLI to accept it by setting the MESMER_HTTP_ACCEPT_CERTIFICATE environment variable to the location of a PEM-encoded CA certificate.
# Set the address of your proxy
$ export HTTPS_PROXY="http://your.proxy"

# (Optional, only if you need to manually trust your proxy's certificate)
$ export MESMER_HTTP_ACCCEPT_CERTIFICATE="/path/to/ca-cert.pem"

# This will now make requests through the proxy
$ mesmer project describe

Guides

Here, we go over some useful recipes for the Mesmer CLI:

Mesmer in CI

Using Mesmer in a CI flow is a natural extension of what we do best---making testing painless and easy through automation.

Quickstart

Before we get into the details of how to configure the CLI, we'll start with a basic working example. This CI script:

  • Installs the Mesmer CLI in your CI worker
  • Configures the CLI for your Mesmer project
  • Uploads a build to Mesmer
  • Starts tests and kicks off a crawl of that build
  • Waits for the tests to finish
  • Logs the test results
# Download the CLI, and add it to $PATH for the rest of this shell session
# (also: if your CI provider doesn't package `jq` by default, install it here)
source <(curl -s https://cli.mesmerhq.com/release/install.sh)

# Configure the CLI. You can also set these environment variables in your CI provider's settings.
export MESMER_TENANT="your.tenant.mesmerhq.com"
export MESMER_PROJECT="xxxxxxxxxxxxxxxxxxxxxxxx" # found in the URL: https://your.tenant.mesmerhq.com/home/$project_id/...
export MESMER_AUTH_TOKEN="[redacted]"            # generate with `mesmer auth login`, or "Your Profile" -> "Token" on the web

# Run your build script
# Here you invoke Gradle, xcodebuild, etc.
./build-my-application.sh --output-binary-to myapp.apk

# Submit the build for testing and crawl, capturing the freshly-created build ID
build_id="$(mesmer -q .buildId submit myapp.apk)"

# Wait for tests to finish, and then log the results.
mesmer test wait $build_id
mesmer test results $build_id

Installing the CLI

You can install the latest release of the CLI with the install script:

# Download the CLI, and add it to $PATH for the rest of this shell session
$ source <(curl -s https://cli.mesmerhq.com/release/install.sh)

This guide assumes your CI provider is running Linux. For other operating systems, the procedure is similar, but not the same: you'll need to run the appropriate installer for your platform, and use the appropriate shell scripting syntax.

Configuring Authentication

You can authenticate the CLI through environment variables---set wherever your CI platform keeps its secrets. Generally, you can configure the environment of your CI runner through your platform's web UI (GitHub Actions, CircleCI, Travis CI).

# (in your CI script, or configuration UI)
$ export MESMER_AUTH_TOKEN="[your auth token]"

You can generate an auth token by running mesmer auth login locally, followed by a mesmer auth list --show-tokens.

Configuring your Project

To configure the CLI to find the right tenant and project, check your .mesmer.yml project file in to version control:

# (locally)

# If you don't have one already, create a .mesmer.yml file
# containing your tenant and project ID.
$ [[ ! -e .mesmer.yml ]] && mesmer init

# Check in .mesmer.yml
$ git add .mesmer.yml && git commit -m "Add .mesmer.yml" && git push

Alternatively, you can set environment variables to inform the CLI about your project:

# (in CI)

$ export MESMER_TENANT="your.tenant.hostname.mesmerhq.com"
$ export MESMER_PROJECT="xxxxxxxxxxxxxxxxxxxxxxxx"

Automating your tests

To automatically submit test and crawl jobs to Mesmer, build your application, then call mesmer submit on the final binary:

# (in your CI script)

# Build your app
$ ./your-build-script -o build.apk

# Submit the build for testing and crawl
# Use an output query to pull off the buildId property
# Note: make sure that `jq` is installed in your CI environment.
$ build_id="$(mesmer -q .buildId submit build.apk)"

─── Creating the build
 ✓  Uploaded build
     Build ID  aaaaaaaaaaaaaaaaaaaaaaaa

─── Queueing up jobs
 ✓  Got test configuration
 ✓  Fetched compatible devices
 ✓  Selected device for tests
 ✓  Tests in queue
 ✓  Crawl in queue

─── Waiting for jobs
 ✓  Tests in progress
 ✓  Crawl in progress
     Crawl ID  bbbbbbbbbbbbbbbbbbbbbbbb

─── Done!

    Tests
    https://some-tenant.mesmerhq.com/home/xxxxxxxxxxxxxxxxxxxxxxxx/testresults/aaaaaaaaaaaaaaaaaaaaaaaa

    Crawl
    https://some-tenant.mesmerhq.com/home/xxxxxxxxxxxxxxxxxxxxxxxx/app-map/aaaaaaaaaaaaaaaaaaaaaaaa

# Wait for tests to finish...
$ mesmer test wait $build_id

# ...And log the test results
$ mesmer test results $build_id

This will upload the build for testing and crawl, wait for all tests to complete, and then log their results.

Command Reference

In this section, we cover:

Global options

The Mesmer CLI has several options that you can use to change functionality across every command. They're grouped into a few general categories:

Formatting and Querying Output

Every subcommand's output has two forms: human-readable text, and JSON. You can pick which one you want with the --json flag, of with the MESMER_OUTPUT_JSON environment variable:

# Get output as JSON
$ mesmer --json build list

# Alternatively: set this with an environment variable
$ MESMER_OUTPUT_JSON=true mesmer build list

# Get output as a table
$ mesmer build list

If you happen to have jq installed on your system, you can run queries over this JSON output with the --query flag (abbreviated as -q), or the MESMER_OUTPUT_QUERY environment variable:

# Output a plaintext list of device UDIDs
$ mesmer -q '.[].udid' device list

# Alternatively: set this with an environment variable
$ MESMER_OUTPUT_QUERY=".[].udid" device list

jq's raw output mode is enabled by default here, so you can use the --query flag to integrate the Mesmer CLI easily with other standard UNIX commands:

# Print detailed build metadata, for every build in the current project:
$ mesmer -q ".[]._id" build list | xargs -L1 mesmer build describe

Batch and Interactive Mode

By default, mesmer detects whether stdin or stdout is a TTY, and uses that to enable or disable interactive prompts and formatting. You can override this detection with the --interactive and --batch flags:

# Never show progress indicators
$ mesmer --batch submit binary.apk

# Always show progress indicators
$ mesmer --interactive submit binary.apk

# Never prompt to select a project
$ mesmer --batch project list

Project, Tenant, and Token

mesmer will look for authentication information in auth.yml, located in the config directory; and it will look for project and tenant information in .mesmer.yml in the current directory (see: mesmer init). If you want to override this, you can use the --tenant, --project, and --token global options.

# List builds in $project_id
$ mesmer --project $project_id build list

# Describe a project
$ mesmer --tenant my.tenant.here.mesmerhq.com --project $project_id project describe

# Override the auth token from `auth.yml`
$ mesmer --token $auth_token device list

You can also pass these variables in via the environment, which is useful in a CI workflow:

$ export MESMER_TENANT="[your tenant hostname]"
$ export MESMER_AUTH_TOKEN="[your auth token]"
$ export MESMER_PROJECT="[your project id]"
$ mesmer submit application.apk

These values, whether passed in via parameter or the environment, will override those found in auth.yml and .mesmer.yml.

mesmer auth

Sign in to the CLI, and get authentication info and tokens.

mesmer auth login

You can sign in to the CLI interactively with mesmer auth login:

$ mesmer auth login some-tenant.mesmerhq.com

─── Sign In
    some-tenant.mesmerhq.com
    Email: william.goodall@mesmerhq.com
    Password [hidden]: [hidden]

 ✓  Authenticated as William Goodall

This will issue an auth token attached to your account, and save it to to auth.yml, in the config directory.

If you've already issued an auth token for your account, you'll be prompted to revoke it and issue a new one:

─── Re-Issue Token
    An auth token is already associated with this account.
    To sign in to the CLI, we'll need to revoke the existing
    token, and generate a new one. Is that OK?
    Revoke existing token? yes

 ✓  Re-issued auth token

If you don't revoke your account token, or if there's a problem issuing one, you'll be logged in to the CLI with a temporary session:

─── Re-Issue Token
    An auth token is already associated with this account.
    To sign in to the CLI, we'll need to revoke the existing
    token, and generate a new one. Is that OK?
    Revoke existing token? no

Auth token could not be issued.
Your session is temporary.

This temporary session will expire after a day, or whenever you log into the web UI with that account.

mesmer auth list

You can view all stored credentials with mesmer auth list:

# Show all stored credentials, checking whether they're valid.
$ mesmer auth list
Tenant                                             Login
some-tenant.mesmerhq.com                           Valid: user1@mesmerhq.com
some-other-tenant.mesmerhq.com                     Valid: user2@mesmerhq.com

# Skip the validity check. This is a little faster.
$ mesmer auth list --no-check
Tenant                                             Login
some-tenant.mesmerhq.com                           [unchecked]
some-other-tenant.mesmerhq.com                     [unchecked]

# Include the tokens themselves in the output. Disabled by default.
$ mesmer auth list --show-tokens

As usual, you can query this information with jq:

# print the first stored auth token
$ mesmer -q '.[].token' auth list --no-check --show-tokens

mesmer auth remove

You can delete a saved credential with mesmer auth remove:

# What do we have?
$ mesmer auth list --no-check
Tenant                                             Login
some-tenant.mesmerhq.com                           [unchecked]
thing-to-remove.mesmerhq.com                       [unchecked]

# Remove a credential
$ mesmer auth remove thing-to-remove.mesmerhq.com

# ...and it's gone.
$ mesmer auth list --no-check
Tenant                                             Login
some-tenant.mesmerhq.com                           [unchecked]

mesmer build

Upload, manage, list, and delete builds.

mesmer build upload

You can upload application binaries (in .apk, .ipa, or .zip format) here:

# Upload `binary.apk` to the current project
$ mesmer build upload binary.apk
 ✓  Uploaded build
Package Identifier .. com.google.android.calculator
Type ................ APK

            Build ID  aaaaaaaaaaaaaaaaaaaaaaaa

# At the moment, `.app` files aren't supported
$ mesmer build upload example.app
Error: Unsupported build format: '.app' bundle
Try uploading an .apk, .ipa, or .zip file instead

mesmer build describe

Given a build ID, you can get more detailed info about that build, including the ID of its most recent crawl:

# Describe that build
$ mesmer build describe $build_id
Name .............. Calculator
Package ........... com.google.android.calculator
Binary Name ....... calculator.apk
Type .............. APK
Crawl completed? .. true

        Last Crawl  bbbbbbbbbbbbbbbbbbbbbbbb

# Get more detailed information as JSON
$ mesmer -j build describe $build_id
{
  "_id": "aaaaaaaaaaaaaaaaaaaaaaaa",
  "name": "Calculator",
  "createdAt": "2020-06-11T04:16:06.751Z",
  "updatedAt": "2020-06-16T14:17:10.305Z",
  "version": "7.8 (271241277)",
  "versionLong": "78000303",
  "package": "com.google.android.calculator",
  "type": "APK",
  ... etc ...
}

mesmer build list

You can list all the builds in the current project with mesmer build list:

# List all builds
$ mesmer build list
Build ID                 Version    Crawl Done? Test Date
xxxxxxxxxxxxxxxxxxxxxxxx 78000302   false       Wed, 17 Jun 2020 23:58:38 +0000
xxxxxxxxxxxxxxxxxxxxxxxx 78000301   false       Tue, 16 Jun 2020 19:34:52 +0000
xxxxxxxxxxxxxxxxxxxxxxxx 78000300   false       Tue, 16 Jun 2020 02:05:21 +0000
xxxxxxxxxxxxxxxxxxxxxxxx 78000299   true        Thu, 11 Jun 2020 04:16:06 +0000
xxxxxxxxxxxxxxxxxxxxxxxx 78000298   true        Wed, 10 Jun 2020 14:53:44 +0000
xxxxxxxxxxxxxxxxxxxxxxxx 78000297   false       Wed, 10 Jun 2020 01:11:45 +0000
xxxxxxxxxxxxxxxxxxxxxxxx 78000296   true        Tue, 09 Jun 2020 21:42:26 +0000
xxxxxxxxxxxxxxxxxxxxxxxx 78000295   true        Tue, 09 Jun 2020 21:37:02 +0000

Again, you can use --json to get a bunch more detailed information here.

mesmer build delete

You can delete a build with mesmer build delete. This will stop any ongoing tasks, remove all past crawls, and finally, delete the build from your project.

$ mesmer build delete $build_id
 ✓  Ongoing tasks stopped
 ✓  No past crawls to remove
 ✓  Build deleted

mesmer crawl

Start, stop, and manage application crawling.

mesmer crawl {start,stop}

These two subcommands start or stop crawling a particular application build. You can get the build id from mesmer build list.

To enable a11y auditing, pass the --a11y flag. This will audit with the first a11y policy configured in your Mesmer tenant. To use a particular a11y policy, you can pass the policy ID (from mesmer a11y policies) with the --a11y-policy parameter.

# Start a 30min crawl
$ mesmer crawl start $build_id --duration 30
 ✓  Crawl in queue
 ✓  Crawl started
 Crawl ID  bbbbbbbbbbbbbbbbbbbbbbbb

# Submit a crawl, run an a11y audit, and don't wait for the crawl to start
$ mesmer crawl start $build_id --a11y --no-wait
 ✓  Crawl in queue

# Stop a crawl
$ mesmer crawl stop $build_id
 ✓  Crawl stopped
 Crawl ID  bbbbbbbbbbbbbbbbbbbbbbbb

mesmer crawl describe

You can get detailed crawl results with mesmer crawl describe, including an overview of the App Map, and device execution information.

# Get the crawl ID from the build
$ mesmer build describe $build_id
Name .............. Calculator
Package ........... com.google.android.calculator
Binary Name ....... calculator.apk
Type .............. APK
Crawl completed? .. true

        Last Crawl  bbbbbbbbbbbbbbbbbbbbbbbb

# Describe the crawl
$ mesmer crawl describe $crawl_id
Crawl
Completed? .. true
Started At .. 2020-06-25 04:42:15.269 UTC
End At ...... 2020-06-25 04:59:34.898 UTC
Duration .... 720 mins

 Device UDID  fffffffffffff
    Crawl ID  cccccccccccccccccccccccc
    Audit ID  gggggggggggggggggggggggg

App Map
+ unknown (hash: [none])
  + CAR_SWIPE (hash: 4081128378124688611)
    + PERMISSION_POPUP (hash: 9343593201226972331)
      + BLANK_SCR (hash: 71776120705449983)
        + CAR_SWIPE (hash: 10136218076990102755)
      + PERMISSION_POPUP (hash: 4120016232598870201)
        + CAR_SWIPE (hash: 10136218076990102755)
      + Out of context (hash: 843484986895691527)

mesmer crawl history

You can fetch the list of all crawls executed against a build with mesmer crawl history:

$ mesmer crawl history $build_id
Crawl ID                 Device               Duration Screens Depth   A11y Status          Audit ID
aaaaaaaaaaaaaaaaaaaaaaaa samsung SM-G950U1      2 mins       4       3 Queued               dddddddddddddddddddddddd
bbbbbbbbbbbbbbbbbbbbbbbb samsung SM-G950U1      5 mins       2       3 Starting             eeeeeeeeeeeeeeeeeeeeeeee
cccccccccccccccccccccccc samsung SM-G950U1      2 mins       8       2 Completed            ffffffffffffffffffffffff

mesmer crawl wait

This will block until the given crawl exits.

# Wait for a crawl to complete
$ mesmer crawl wait $crawl_id
 ⠹  Waiting for crawl to complete...  (8 screens discovered)
 ✓  Crawl complete

mesmer crawl browse

This will pop open the crawl results in a web browser. Some things just better suited with a GUI.

$ mesmer crawl browse $crawl_id
https://$tenant/home/$project/app-map/$crawl

mesmer a11y

Manage accessibility policies; run audits and view their results.

mesmer a11y wait

Block until a given a11y crawl completes.

# Submit a build for testing
$ crawl_id=$(mesmer -q .crawlId submit --no-test --duration 5 ../example.apk)
  < output omitted>

# Wait for that a11y crawl to complete.
$ mesmer a11y wait $crawl_id
 ✓  A11y audit in progress
 ✓  Audit complete
 Audit ID  5fbc861024fce60c479b3887

mesmer a11y describe

To get the result of an accessibility audit, use a11y describe. You can get the audit ID from mesmer crawl describe.

$ mesmer a11y describe $audit_id
Criterion ID             Screen ID  Object ID  Code       Name                           URL
5f50ad33b0ab0f4a6b275e1a 16928      17         1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
5f50ad33b0ab0f4a6b275e1a 16928      126        1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
5f50ad33b0ab0f4a6b275e1a 16928      128        1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
5f50ad33b0ab0f4a6b275e1a 16928      156        1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
5f50ad33b0ab0f4a6b275e1a 16928      90         1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
5f50ad33b0ab0f4a6b275e1a 16928      144        1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
5f50ad33b0ab0f4a6b275e1a 16928      122        1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
5f50ad33b0ab0f4a6b275e1a 16928      158        1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
5f50ad33b0ab0f4a6b275e1a 16928      51         1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html
5f50ad33b0ab0f4a6b275e1a 16928      143        1.1.1      Non-text Content - Others      https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html

mesmer a11y policies

List all the accessibility policies configured for the current tenant.

$ mesmer a11y policies
Policy ID                Status     Name                           Version  Org.       Creator
aaaaaaaaaaaaaaaaaaaaaaaa Inactive   WCAG                           2.1      W3C        Jessica
bbbbbbbbbbbbbbbbbbbbbbbb Active     Custom Policy                  2.1      W3C        Robert

mesmer a11y activate

To set a given policy as active, use a11y activate:

$ mesmer a11y policies
Policy ID                Status     Name                           Version  Org.       Creator
aaaaaaaaaaaaaaaaaaaaaaaa Inactive   WCAG                           2.1      W3C        Jessica
bbbbbbbbbbbbbbbbbbbbbbbb Active     Custom Policy                  2.1      W3C        Robert

$ mesmer a11y activate $policy_id
 ✓  Set active policy

$ mesmer a11y policies
Policy ID                Status     Name                           Version  Org.       Creator
aaaaaaaaaaaaaaaaaaaaaaaa Active     WCAG                           2.1      W3C        Jessica
bbbbbbbbbbbbbbbbbbbbbbbb Inactive   Custom Policy                  2.1      W3C        Robert

mesmer a11y policy

You can export a given policy as JSON with a11y policy

$ mesmer a11y policy $policy_id
[ ... a lot of JSON on standard out ... ]

$ mesmer -q '._standard._description' a11y policy $policy_id
Web Content Accessibility Guidelines (WCAG) 2.1 defines how to make Web content more accessible to people with disabilities.

mesmer device

Manage the devices in your Mesmer tenant, and view the job queue.

mesmer device list

You can list all the devices in your Mesmer tenant with mesmer device list:

$ mesmer device list
UDID                                     Status      Type     Vendor  Device             OS      Version  Resolution User
xxxxxxxxxxxxxxxxxxxxxxxxxxxx             Ready       Real     Apple   iPhone 7 Plus      iOS     12.4.1   1242x2208
xxxxxxxxxxxxxxxxxxxxxxxx                 Ready       Real     Apple   iPhone 7 Plus      iOS     13.1.3   1242x2208
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ready       Real     Apple   iPhone 7 Plus      iOS     13.1.3   1242x2208
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx         Ready       Virtual  Apple   iPhone 8 Plus      iOS     13.3     1242x2208
xxxxxxxxxxxxxxx                          Ready       Virtual  Apple   iPhone 8 Plus      iOS     13.3     1242x2208
xxxxxxxxxxxx                             Ready       Virtual  Apple   iPhone 8 Plus      iOS     13.3     1242x2208
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx       Ready       Virtual  Apple   iPhone 8 Plus      iOS     13.3     1242x2208
xxxxxxxxxxxxxxxxxxxxxxxxxxxx             Ready       Real     Apple   iPhone 8 Plus      iOS     13.3     1242x2208
xxxxxxxxxxxxxxxxxxxxxxxx                 Ready       Virtual  Apple   iPhone 8 Plus      iOS     13.3     1242x2208
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ready       Virtual  Apple   iPhone 8 Plus      iOS     13.3     1242x2208
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx         Ready       Virtual  Apple   iPhone 8 Plus      iOS     13.3     1242x2208
xxxxxxxxxxxxxxxxxxxxxxxxxxxx             Ready       Real     Apple   iPhone Xʀ          iOS     13.1.3   828x1792
xxxxxxxxxxxxxxxxxxxxxxxx                 Ready       Real     Apple   iPhone Xʀ          iOS     13.1.3   828x1792
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ready       Real     Google  Pixel 3            Android 9        1080x2160
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx         Ready       Real     Google  Pixel 3            Android 9        1080x2160
xxxxxxxxxxxxxxx                          Ready       Real     Google  Pixel 3            Android 9        1080x2160
xxxxxxxxxxxx                             Ready       Virtual  Google  nexus5             Android 9        1080x1920
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx       Ready       Virtual  Google  nexus5             Android 9        1080x1920
xxxxxxxxxxxxxxxxxxxxxxxxxxxx             Ready       Virtual  Google  pixel3             Android 9        1080x2160
xxxxxxxxxxxxxxxxxxxxxxxx                 Ready       Virtual  Google  pixel3             Android 9        1080x2160
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx In Use      Virtual  Google  pixel3             Android 9        1080x2160 William Goodall (Crawl)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx         Ready       Virtual  Google  pixel3             Android 9        1080x2160
xxxxxxxxxxxxxxx                          Ready       Virtual  Google  pixel3             Android 9        1080x2160
xxxxxxxxxxxx                             Ready       Real     samsung SM-G950U           Android 8.0.0    1440x2960
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx       Ready       Real     samsung SM-G950U           Android 8.0.0    1440x2960

This output will show what each device is up to; and who told it to do what it's doing. This is really useful if you need to see why a job seems to be taking a while in queue, or why devices are in use.

mesmer device jobs

Show the job queue, across any currently-active devices.

# Make some things happen
$ mesmer submit calculator.apk

# Show the job queue
$ mesmer device jobs
 ✓  Fetched all devices
 ✓  Fetched unassigned jobs
 ✓  Fetched queue for each device

Unassigned:
    Type       Job name                       Version                                   Submitted By
    Test       5x5 = 25                       7.8 (271241277)      78000303             CLI Test User

 UDID  emulator-5576
    OS ............ 9
    Model ......... pixel3
    Manufacturer .. Google
    Resolution .... 1080x2160

    Current Job:
    Kind .......... Crawl
    Version ....... 7.8 (271241277) - 78000303
    Submitted by .. CLI Test User
    Started At .... Tue, 07 Jul 2020 05:03:32 +0000
          Build ID  5f0402173c969210ccee870f
          Crawl ID  5f0402243c969210ccee8718


 UDID  emulator-5574
    OS ............ 9
    Model ......... pixel3
    Manufacturer .. Google
    Resolution .... 1080x2160

    Current Job:
    Kind .......... Replay
    Version ....... 7.8 (271241277) - 78000303
    Submitted by .. CLI Test User
    Started At .... Tue, 07 Jul 2020 05:03:20 +0000
          Build ID  5f0402173c969210ccee870f

mesmer data

Retrieve project test data.

Why test data is useful

Test data informs the logic behind application crawls and test execution. When test data is present in a project, crawls and test assertions can make use of:

  • Login credentials
  • Credit card information, in checkout flows
  • Search keywords and queries
  • Virtualized device locations
  • Custom key-value data

Mesmer will use test data to inform application crawls wherever it's relevant---for instance, entering login credentials whenever it sees a login form, or entering a search keyword whenever it detects a search box as part of the UI. Additionally, you can use the test data to define assertions when recording a test case.

mesmer data describe

Fetch a project's test data.

# Update test data from test_data.yml
$ mesmer data describe
Data ID                  Namespace  Type         Group Name           Data
5fb524e77fd8f10a597911bf Project    Custom       [no group]           Custom1604305219559:abc@gmail.com
5fb524e77fd8f10a597911c0 Project    Custom       [no group]           searchLocation:location
5fb524e77fd8f10a597911c1 Project    GPS          coordinates1         latitude:41.8755616  longitude:-87.6244212
5fd337b070f774000fdf1871 Project    Login        test                 username:test••••••••••  password:••••••••
5fd33eb3d02c71c336cb5c33 Project    Login        login1               username:test  password:example
5fb524e77fd8f10a597911c2 Project    Search Term  [no group]           search1:video

To include test-case level test data, use the --test argument, and pass in a test ID:

# Get the first test ID
$ test_id="$(mesmer -q '.[0]._id' test list)"

# List test data for that test
$ mesmer data describe --test $test_id
Data ID                  Namespace  Type         Group Name           Data
5fb524e77fd8f10a597911c3 Test Case  Address      address1             first_name:adfs  last_name:sdf  address_line1:asfsf223  address_line2:a23324  city:assr23  state:asdf  zipcode:234324  country:aadf
6040400df61815000f56d7d9 Test Case  Address      testaddr             Firstname:asdf  Lastname:asdf  Addressline1:asdf  Addressline2:asdf  City:asdf  State:asdf  Zipcode:asdf  Country:asdf
60403d26f61815000f56d7c8 Project    Credit Card  fakeCC               Cardnumber:1234123412341234  Expiry:exp  CVV:123  Firstname:Fakefirstname  lastsnameEditedIdent:Fakelastname
60404048f61815000f56d7e2 Test Case  GPS          coord1               Latitude:123  Longitude:456
5fb524e77fd8f10a597911c1 Project    GPS          coordinates1         latitude:41.8755616  longitude:-87.6244212
60403fedf61815000f56d7d8 Test Case  Login        testlogin2           Username:someusername  Password:somepassword
5fd33eb3d02c71c336cb5c33 Project    Login        login1               username:test  password:mesmer
5fb524e77fd8f10a597911c2 Project    Search Term  [no group]           search1:video

Init

Initialize a project in the current directory.

mesmer init

For each project, mesmer init will create a file named .mesmer.yml, in the current directory, containing tenant and project IDs. This is intended to be checked in to version control, and versioned alongside your app's code.

To set up a project in the current directory, run mesmer init, passing the tenant and project IDs:

# Initialize a project by selecting it interactively
$ mesmer init
Select a tenant:
> some.tenant.mesmerhq.com
  another.tenant.here.mesmerhq.com
Select a project:
  Calculator
  Contacts
> Chrome
  Calculator
  TestApp
  Music
✓  Created Mesmer project in "/home/wgoodall01/Dev"

# Reset by removing the project file
$ rm .mesmer.yml

# Initialize a project literally
$ mesmer --tenant my.tenant.here.mesmerhq.com --project $PROJECT_ID init
 ✓  Created Mesmer project in "/your/working/directory"

# Look at the config file created
$ cat .mesmer.yml
---
tenantUrl: my.tenant.here.mesmerhq.com
projectId: $PROJECT_ID

This sets up the project configuration, so later invocations in this directory know what tenant and project you're talking about.

mesmer project

List and describe Mesmer projects.

mesmer project list

You can list all the projects in your tenant with mesmer project list.

# List all projects in a tenant (picked interactively)
$ mesmer project list
Select a tenant:
> some-tenant.mesmerhq.com
  some-other-tenant.mesmerhq.com
Project ID               Name                                     Platform   Package ID
aaaaaaaaaaaaaaaaaaaaaaaa Calculator                               Android    com.google.android.calculator
aaaaaaaaaaaaaaaaaaaaaaaa Safari                                   iOS        com.apple.safari
aaaaaaaaaaaaaaaaaaaaaaaa ExampleApp                               Android    com.example.example
aaaaaaaaaaaaaaaaaaaaaaaa Chrome                                   Android    com.android.chrome
aaaaaaaaaaaaaaaaaaaaaaaa Contacts                                 Android    com.google.android.contacts

# List all projects (this time, non-interactively.)
$ mesmer init ...
$ mesmer project list
Project ID               Name                                     Platform   Package ID
aaaaaaaaaaaaaaaaaaaaaaaa Calculator                               Android    com.google.android.calculator
aaaaaaaaaaaaaaaaaaaaaaaa Safari                                   iOS        com.apple.safari
...etc...

If the CLI can't determine your tenant, it will prompt you with anything you have tokens for in auth.yml. If you have already defined your project, it will skip that prompt, and use the values from .mesmer.yml

mesmer project describe

Describe the current project. Note that you can describe any project with the --project global flag.

$ mesmer init ...

# Describe the current project
$ mesmer project describe
Name ..... Calculator
Type ..... Android
Package .. com.google.android.calculator

 Project ID  aaaaaaaaaaaaaaaaaaaaaaaa

# Describe some other project
$ mesmer --project $PROJECT_ID project describe
Name ..... ExampleApp
Type ..... Android
Package .. com.example.example

 Project ID  bbbbbbbbbbbbbbbbbbbbbbbb

mesmer project update

Update the details of the current project. Right now, the only attribute you can edit is the project name:

# Rename the current project to "new-name"
$ mesmer project update --name "new-name"
 ✓  Updated project

mesmer submit

mesmer submit does pretty much everything it can with a given application binary.

It will:

  1. Upload your binary to a new build in the current project
  2. Pick an appropriate device to replay tests
  3. Queue up test replay
  4. Queue up an application crawl
  5. Block until the all queued jobs start to take place.

This is what that looks like when you call it:

$ mesmer submit my-app.apk

─── Creating the build
 ✓  Uploaded build
     Build ID  aaaaaaaaaaaaaaaaaaaaaaaa

─── Queueing up jobs
 ✓  Got test configuration
 ✓  Found compatible device(s)
 ✓  Selected device for tests
 ✓  Tests in queue
 ✓  Crawl in queue

─── Waiting for jobs
 ✓  Tests in progress
 ✓  Crawl in progress
     Crawl ID  bbbbbbbbbbbbbbbbbbbbbbbb

─── Done!

    Tests
    https://some-tenant.mesmerhq.com/home/xxxxxxxxxxxxxxxxxxxxxxxx/testresults/aaaaaaaaaaaaaaaaaaaaaaaa

    Crawl
    https://some-tenant.mesmerhq.com/home/xxxxxxxxxxxxxxxxxxxxxxxx/app-map/aaaaaaaaaaaaaaaaaaaaaaaa

Optionally, you can pass --no-crawl or --no-test to skip crawling or skip testing, respectively.

For more control over test execution, you can use --tags Tag1 Tag2 etc to only run tests matching one of several tags. See mesmer test start for more information.

To enable a11y auditing, pass the --a11y flag. This will audit with the first a11y policy configured in your Mesmer tenant. To use a particular a11y policy, you can pass the policy ID (from mesmer a11y policies) with the --a11y-policy parameter.

CI

This command is all you really need to integrate Mesmer with your CI environment. You can use environment variables to pass in your tenant url, project id, and authentication token (generated on a developer machine).

# This configuration can live wherever your CI platform likes to keep its secrets
$ export MESMER_TENANT="[your tenant url]"
$ export MESMER_AUTH_TOKEN="[your auth token]"
$ export MESMER_PROJECT="[your project id]"

# Then, in your CI script:
$ ./my-build-script-or-whatever --output build.apk
$ mesmer submit build.apk
...etc...

mesmer will pick up its configuration from the environment here, and happily upload and test your fresh build.

mesmer test

Start, stop, list, describe, and manage tests.

mesmer test list

List all the test cases in the current project.

# List all test cases
$ mesmer test list
Test ID                  Name                           Status     Execution
aaaaaaaaaaaaaaaaaaaaaaaa Overflow check                 Review     Available
bbbbbbbbbbbbbbbbbbbbbbbb 5x5 = 25                       Review     Available

# List the tests somewhere else, assuming you're authenticated for it
$ mesmer --project $SOME_OTHER_PROJECT test list

mesmer test describe

Show more detail about a test, like its tags. This will also give an overview of what steps make up that test case.

# Describe the "overflow check" test
$ mesmer test describe $test_id
Test
Name .. Overflow check
Tags .. Overflow

 Test ID  aaaaaaaaaaaaaaaaaaaaaaaa

Steps:
No. Type
1   Launch   -
2   Tap      (133, 1510)
3   Tap      (150, 1790)
4   Tap      (1050, 1330)
5   Tap      (896, 1606)
6   Tap      (106, 1470)
7   Tap      (136, 1540)
8   Tap      (126, 1843)
9   Tap      (560, 1823)
10  Tap      (1053, 1343)
11  Tap      (903, 1850)
12  Tap      (70, 1200)
13  Tap      (523, 1800)
14  End      -

mesmer test tags

Show all the test tags in a given project. You can pass any combination of these tags to mesmer test start to start executing some subset of all your tests.

$ mesmer test tags
Tag name
Math
Overflow

mesmer test tag

Modify the tags on a test case.

To add a new tag, use --add:

$ mesmer test tag $test_id --add some_new_tag  # adds some_new_tag to the test
$ mesmer test tag $test_id --add tag1 tag2     # adds tag1 and tag2 to the test

To replace a test's tags entirely, use --replace:

$ mesmer test tag $test_id --replace           # removes all tags
$ mesmer test tag $test_id --replace some_tag  # removes existing tags, adds `some_tag`

To remove tags, use --remove:

$ mesmer test tag $test_id --remove deleteme   # removes the deleteme tag from the test

You can use -- to pass tags verbatim, or safely from scripts:

$ mesmer test tag $test_id --add -- --remove   # tags the test with '--remove', literally

# You can pass multiple tags safely after `--`:
$ tags=("some" "--funky" "tags" "in" "a" "bash array")
$ mesmer test tag $test_id --add -- "${tags[@]}"

mesmer test start

Start executing tests for the current project.

$ mesmer test start $build_id
 ✓  Found compatible device(s)
 ✓  Execution started

You can also pick a subset of tests to run, by only running tests with specific tags:

# Only start tests tagged `Math`
$ mesmer test start $build_id --tag Math
 ✓  Found a test device
 ✓  Execution started

# Start tests tagged `Math` or `Overflow`, on 2 devices in parallel.
$ mesmer test start \
  --tags \
    Math \
    Overflow \
  -- $build_id  # note: you need the `--` so the arguments aren't ambiguous
 ✓  Found a test device
 ✓  Execution started

mesmer test stop

Stops testing for a given build. Fairly self-explanatory.

$ mesmer test stop $build_id
 ✓  Stopped tests

# And, if tests aren't already ongoing
$ mesmer test stop $build_id
Error: no in-progress test to stop

mesmer test status

Gets the status of a given test's execution: how many test cases are queued up, in progress, finished, have passed or failed.

Pass it the build id, and check in on your tests:

$ mesmer test status $build_id
Total tests  | 10
Total issues | 2
In queue     | 1

New          | 0
In Progress  | 4
Passed       | 3
Failed       | 2
Errored      | 0
To Review    | 2

mesmer test wait

Wait for testing to stop on a given build. This command will sit there and block until all the tests have finished.

$ mesmer test wait $build_id
 ⠹  Waiting for tests to complete...  (0 queued, 1 in progress, 1 done)

# The command will exit when all testing has finished:
Passed       | 8
Failed       | 2
Errored      | 0
To Review    | 2

This might be useful in some CI workflows---if you need to wait to get test results, this makes it easy.

mesmer test results

You can get a test's results like so:

$ mesmer test results $build_id
                 Test ID                  Name                           Alerts  Owner
 ✓  Passed       aaaaaaaaaaaaaaaaaaaaaaaa 5x5 = 25                       0       William Goodall
 ✓  Passed       bbbbbbbbbbbbbbbbbbbbbbbb Overflow check                 0       William Goodall
 X  Review       cccccccccccccccccccccccc 25 x 25                        0       SupportUser

mesmer test detail

You can get detailed results for the execution of a given test and build like so:

$ mesmer test detail --build=$build_id --test=$test_id
 ✓  Fetched test case
 ✓  Fetched device groups

Name .. Always fails
Tags ..

Device: SM-G950U1 (98892a333659583649)
Errors ...... 0
Defects ..... 1
For Review .. 0
Duration .... 51.15
  Step 1 - OK
  Step 2 - OK
  Step 3 - OK
  Step 4 - OK
  Step 5 - Failed
    Object Results
    Part ID                  Message
    5f5ee8e6a8b3070010216025 User Defined Assertion Error
    Screen Results
    Part ID                  Message
    no test parts reported
  Step 6 - OK

Device: pixel3 (emulator-5560)
Errors ...... 0
Defects ..... 1
For Review .. 0
Duration .... 65.42
  Step 1 - OK
  Step 2 - OK
  Step 3 - OK
  Step 4 - OK
  Step 5 - Failed
    Object Results
    Part ID                  Message
    5f5eea63a8b3070010216064 User Defined Assertion Error
    Screen Results
    Part ID                  Message
    no test parts reported
  Step 6 - OK

mesmer test browse

Open a given build's test results in a web browser.

$ mesmer test browse $build_id
https://some-tenant.mesmerhq.com/home/xxxxxxxxxxxxxxxxxxxxxxxx/testresults/bbbbbbbbbbbbbbbbbbbbbbbb

mesmer util

Useful utilities.

mesmer util env

This will print whatever values the CLI gathers from its environment.

Passing --show-tokens will include auth tokens in the output.

$ mesmer util env
Interactive .............. true
Tenant ID ................ some-tenant.mesmerhq.com
Project ID ............... xxxxxxxxxxxxxxxxxxxxxxxx
Auth Token ............... [hidden]
Config Directory ......... /home/yourusername/.config/mesmer
Auth Config Location ..... /home/yourusername/.config/mesmer/auth.yml
Project Config Location .. /home/yourusername/Dev/mesmer-cli/.mesmer.yml

mesmer util completions

This command will generate tab-completions for your shell of choice.

Right now, we support:

  • Bash
  • Fish
  • PowerShell
# Install bash completions in the current session
$ source <(mesmer util completions)

# Install completions more permanently
# (This is probably not the most idiomatic way to do it. Consult your dotfiles.)
$ mesmer util completions >~/.mesmer-bash-completions.bash
$ echo "source ~/.mesmer-bash-completions.bash" >> ~/.bashrc

# Generate completions for powershell
$ mesmer util completions powershell >mesmer-completions.ps1

mesmer version

Manage versioning and updates.

mesmer version

Print information about the currently-installed release of the Mesmer CLI.

$ mesmer version
Application version
Version .... 0.3.0
Tag ........ v0.3.0
Commit ..... b88d94df6d824c40c93263c97967623ba2fab375
Timestamp .. 2020-06-17T03:02:12+00:00
Dirty? ..... false

Build Configuration
Enabled features .. [none]
Build Profile ..... release
Build Target ...... x86_64-pc-windows-msvc
Rustc Version ..... rustc 1.44.0 (49cae5576 2020-06-01)

mesmer version update

Upgrade the CLI to the latest release. This works regardless of where you've installed the CLI---it downloads the new binary, and simply swaps it out for the old one on disk. The binaries are relatively small (roughly ~10MB or thereabouts), so this only takes a few seconds on a decent internet connection.

$ time mesmer version update
 ✓  An update is available:
    Installed ....... 0.2.1
    Latest Release .. 0.3.0
 ✓  Downloaded new release
 ✓  Installed new release

real	0m0.423s   # it's pretty quick!
user	0m0.046s
sys	0m0.131s

$ mesmer version
Application version
Version .... 0.3.0
...etc...

You can force an update (re-installing even if you're not out of date) by passing the --force flag. This works well with the --from $MANIFEST_URL flag, which can direct the CLI to fetch an update from somewhere other than the latest official release. It's probably a good idea to only use this if directed to by support.

The CLI will also bug you if your version is out of date, showing a warning printed after each command's output:

 ⚠️   CLI update available: run `mesmer version update` to install v0.3.0

You can get rid of this warning by updating.