Overview of Cypress
With Cypress, you can easily create tests for your modern web applications, debug them visually, and automatically run them in your continuous integration builds.Cypress is a front end
testing tool for web applications. Cypress runs on Windows, Linux, and macOS.
Cypress app is open-source software released under the MIT License while the
Cypress Cloud is a web application.
License: Proprietary - Free
& Paid
Stable release: 12.1.0 / December 12,
2022;
Programming language: JavaScript
·
Setting up tests: There are no servers, drivers, or any other
dependencies to install or configure. You can write your first passing test in
60 seconds.
·
Writing tests: Tests written in Cypress are meant to be easy
to read and understand. Our API comes fully baked, on top of tools you are
familiar with already.
·
Running tests: Cypress runs as fast as your browser can
render content. You can watch tests run in real time as you develop your
applications.
·
Debugging tests: Readable error messages help you to debug
quickly. You also have access to all the developer tools you know and love.
Our users are
typically developers or QA engineers building web applications using modern
JavaScript frameworks. Cypress can test anything that runs in a browser.
Cypress enables you to
write all types of tests:
- End-to-end tests
- Component tests
- Integration tests
- Unit tests
Features
Cypress comes fully
baked, batteries included. Here is a list of things it can do that no other
testing framework can:
·
Time Travel: Cypress takes snapshots as your tests run. Hover over commands
in the Command Log to see exactly what happened at each step.
·
Debug ability: Stop guessing why your tests are failing.
Debug directly from familiar tools like Developer Tools. Our readable errors
and stack traces make debugging lightning fast.
·
Automatic Waiting: Never add waits or sleeps to your tests.
Cypress automatically waits for commands and assertions before moving on. No
more async hell.
·
Spies, Stubs, and Clocks: Verify and control the behavior of functions,
server responses, or timers. The same functionality you love from unit testing
is right at your fingertips.
·
Network Traffic Control: Easily control, stub, and test edge cases
without involving your server. You can stub network traffic however you like.
·
Consistent Results: Our architecture doesn't use Selenium or
WebDriver. Say hello to fast, consistent and reliable tests that are
flake-free.
·
Screenshots and Videos: View screenshots taken automatically on
failure, or videos of your entire test suite when run from the CLI. Record to
Cypress Cloud to store them with your test results for zero-configuration
debugging.
·
Cross browser Testing: Run tests within Firefox and Chrome-family
browsers (including Edge and Electron) locally and optimally in a Continuous
Integration pipeline.
·
Smart Orchestration: Once you're set up to record to Cypress
Cloud, easily parallelize your test suite, rerun failed specs first with Spec
Prioritization, and cancel test runs on failures with Auto Cancellation for
tight feedback loops.
·
Flake Detection: Discover and diagnose unreliable tests with
Cypress Cloud's Flaky test management.
Installing Cypress
1. npm install: Install
Cypress via npm:
cd /your/project/path
npm install cypress
--save-dev
This will install Cypress locally as a dev dependency for your
project.
2. yarn add: Installing
Cypress via yarn:
cd /your/project/path
yarn add cypress --dev
System proxy
properties http_proxy, https_proxy and no_proxy are respected for the download
of the Cypress binary.
References:
https://docs.cypress.io/guides/overview/why-cypress
https://docs.cypress.io/guides/getting-started/installing-cypress