Product
Introducing Java Support in Socket
We're excited to announce that Socket now supports the Java programming language.
@percy/cli-command
Advanced tools
The base command class that Percy CLI commands should extend from. Adds commonly used configuration options to Percy config files, a `#percyrc()` method for parsing config files, and other shared methods. Also provides common CLI flags along with oclif fl
@percy/cli-command is a command-line interface (CLI) tool for managing Percy, a visual testing and review platform. It provides commands to interact with Percy services, such as starting and stopping Percy agents, uploading snapshots, and managing projects.
Start Percy Agent
This command starts the Percy agent, which is necessary for capturing visual snapshots during your tests.
npx @percy/cli-command start
Stop Percy Agent
This command stops the Percy agent, which is useful for cleaning up after your tests have completed.
npx @percy/cli-command stop
Upload Snapshots
This command uploads visual snapshots to Percy for comparison and review.
npx @percy/cli-command upload ./path/to/snapshots
Manage Projects
This command creates a new project in Percy, allowing you to organize and manage your visual tests.
npx @percy/cli-command project:create --name 'My Project'
Cypress is a JavaScript end-to-end testing framework that provides a rich set of features for writing and running tests. It includes built-in support for visual testing through plugins like cypress-image-snapshot, which can be used to capture and compare screenshots.
WebdriverIO is a popular testing framework for Node.js that allows you to run tests using the WebDriver protocol. It supports visual regression testing through plugins like wdio-visual-regression-service, which can capture and compare screenshots.
BackstopJS is a tool for visual regression testing that uses headless browsers to capture screenshots of web pages and compare them against baseline images. It provides a CLI for managing tests and generating reports.
The base command class that Percy CLI commands should extend from. Adds commonly used configuration
options to Percy config files, a #percyrc()
method for parsing config files, and other shared
methods. Also provides common CLI flags along with oclif flag functions.
import PercyCommand, { flags } from '@percy/cli-command'
export class PercyPlugin extends PercyCommand {
static flags = {
...flags.logging,
...flags.discovery,
...flags.config
}
run() {
let { args, flags } = this
let { snapshot, discovery } = this.percyrc()
// ...
}
finally() {
// called after #run() and also on process termination events
}
}
The #percyrc()
method will parse command flags for Percy configuration mappings as determined by a
percyrc
flag configuration option.
'allowed-hostnames': flags.string({
// maps the --allowed-hostnames flag to the corresponding config option
percyrc: 'discovery.allowedHostnames'
})
FAQs
Percy CLI command parser and runner.
The npm package @percy/cli-command receives a total of 343,215 weekly downloads. As such, @percy/cli-command popularity was classified as popular.
We found that @percy/cli-command demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We're excited to announce that Socket now supports the Java programming language.
Security News
Socket detected a malicious Python package impersonating a popular browser cookie library to steal passwords, screenshots, webcam images, and Discord tokens.
Security News
Deno 2.0 is now available with enhanced package management, full Node.js and npm compatibility, improved performance, and support for major JavaScript frameworks.