Skip to content

Commit

Permalink
Sauce Visual CLI init
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerem Beygo committed Jul 15, 2024
1 parent 6e20d4e commit 7584528
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions docs/visual-testing/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
id: cli
title: Sauce Visual CLI
sidebar_label: Sauce Visual CLI
---

The Sauce Visual CLI (command line interface) allows you to easily interact with Sauce Visual, streamlining your visual testing workflows. With this tool, you can create new builds, mark builds as completed, and retrieve the current status of any build. This simplifies the process of integrating visual testing into your continuous integration and delivery pipelines, ensuring efficient and accurate visual validation of your web applications.

## What You'll Need

- A Sauce Labs account ([Log in](https://accounts.saucelabs.com/am/XUI/#login/) or sign up for a [free trial license](https://saucelabs.com/sign-up))
- Your Sauce Labs [Username and Access Key](https://app.saucelabs.com/user-settings)

## System Requirements

- Node.js: Version 18.x or higher
- npx: Included with Node.js (version 10.x or higher)
- Operating System: macOS 10.15+, Linux, or Windows 10/11

With these requirements met, you can run the tool using:

`npx @saucelabs/visual build [command] [options]`

## Commands

### create

Creates a Sauce Visual build

Usage: `npx @saucelabs/visual build create [options]`

#### Required

- `-n`, `--name`: Build name

#### Options

- `-r`, `--region`: The Sauce Labs region. Options: `us-west-1`, `eu-central-1`, `us-east-4`. Default: `us-west-1`
- `--branch`: Branch name to associate the build with.
- `--default-branch`: Main branch name to associate the build with. Usually `main` or `master`. Read more [here](https://docs.saucelabs.com/visual-testing/workflows/ci/)
- `-p`, `--project`: Label/project to associate the build with.
- `-c`, `--custom-id`: User-supplied custom ID to associate the build with. For advanced users.

### finish

Finishes a Sauce Visual build

Usage: `npx @saucelabs/visual build finish [options]`

#### Required

- `-b`, `--build-id`: Build ID to finish. Format: `UUID`

OR

- `-c`, `--custom-id`: Custom ID associated with a build to finish.

#### Options
- `-r`, `--region`: The Sauce Labs region. Options: `us-west-1`, `eu-central-1`, `us-east-4`. Default: `us-west-1`

### status

Fetches status from a Sauce Visual build

Usage: `npx @saucelabs/visual build status [options]`

#### Required

- `-b`, `--build-id`: Build ID to finish. Format: `UUID`

OR

- `-c`, `--custom-id`: Custom ID associated with a build to finish.

#### Options

- `-r`, `--region`: The Sauce Labs region. Options: `us-west-1`, `eu-central-1`, `us-east-4`. Default: `us-west-1`

0 comments on commit 7584528

Please sign in to comment.