View all web browser and mobile devices available in our cloud-based test lab.
Cypress is an up-and-coming web testing framework. This growing solution for web test automation is a solid complementary framework to Selenium, which has long been the de facto web automation framework.
This blog will give you the ultimate overview of Cypress testing as well as the benefits of Cypress automation and how to get started.
Complementing the leading Selenium WebDriver framework that has various language bindings and is built on a grid architecture, Cypress testing benefits its users from the test creation phase through its test execution abilities.
There are many reasons to use Cypress testing either instead of or in tandem with other web testing frameworks. Here are some of the key benefits.
With Cypress, you can also run cross-browser testing. You can execute tests with Cypress on Firefox and browsers within the Chrome family, such as Edge and Electron.
It is easy to get started with Cypress automation for web testing. If you have worked with Selenium, you know that you must select all the dependencies and libraries that you need before you start testing. With Cypress, these dependencies and libraries are already set in place with no configuration needed.
In addition, Cypress comes bundled with a Chrome browser, so there is no complex environment to set up. In addition, you can any other browser that is installed on your local machine to test with Cypress. This flexibility and simple setup are highly advantageous when compared to Selenium, which requires the user to download a relevant driver and set up a grid to start testing.
You can debug your web apps with Cypress quickly and easily. When tests fail, you get suggestions for how to fix the defect. From there, you can debug directly from Chrome DevTools. Also, Cypress supports capabilities like Time Travel and real-time reload, so developers can examine their website code both during and after a test execution.
Since Cypress also has access to every object, it simplifies and streamlines error analysis. Cypress can provide screenshots of test failures, which makes finding defects and debugging apps quick and simple.
Cypress is known for its fast test execution — with a response time of less than 20 MS. Cypress has automatic waiting built into the framework, which means that you do not need to define implicit and explicit waits. The framework automatically waits for things like DOM loading, animation, elements, and more.
Furthermore, the framework also runs subsequent tests automatically after the first one is executed. This eliminates downtime and the need to manually trigger the next test.
Cypress is a free and open-source framework. It operates on a freemium model, where you can use the free version or paid version. The paid version includes advanced features, such as a dashboard with artifacts, such as DOM snapshots, which are helpful for debugging, as well as video storage.
Interest is growing in Cypress, and it boasts an active community on GitHub, Gitter, and StackOverflow. Plus, Cypress offers robust documentation.
As a leader in the testing space, Perfecto is proud to already offer full support for the Cypress test automation framework. Perfecto makes it simple to get started with Cypress testing — with Cypress executing web tests on browsers in the Perfecto cloud.
To get started with Perfecto and Cypress, follow these steps:
perfecto-cypress init --tests.path=./tests/
In this step you can also define the cloud name, the Cypress relevant project ID, and more.
import 'perfecto-cypress-reporter'; // or require('perfecto-cypress-reporter');
To learn each, simply run the command below.
With the new SDK, you can either run your Cypress test specs from the command-line by pointing to a test.spec.js file, or through an artifact key that points to a packed test suite in the Perfecto testing cloud.
Below are the supported command options and their shortcut aliases, including the known reporting SDK commands that should be passed as well.
When uploading a Cypress test suite to the Perfecto cloud, utilize the below command options. It is recommended to pass the securityToken as a parameter rather than storing it in the perfecto-config.json file.
Perfecto’s Cypress SDK is fully compliant with Cypress. It supports Chrome, Firefox, and Edge browsers across the various permutations. Configuring the platform capabilities is done within the perfecto-config.json file (see below example).
Open-source only takes you so far. Perfecto is an end-to-end cloud testing platform that works with tools like Cypress, Jenkins, Selenium, and more, and syncs them all together so you can execute at scale.
How Gliffy Developers Sped Up End-to-End Testing With Cypress + Perfecto >>
With Perfecto and Cypress, you can:
Perfecto makes Cypress testing faster and easier to scale. Being an open solution, Perfecto fully compliant with Cypress and integrates into your CI/CD pipeline through tools like Jenkins. Perfecto also integrates with many other frameworks, such as Selenium and WebDriverIO for web testing, as well as mobile testing frameworks like Appium, Espresso, and XCUITest.
Pair Cypress with Perfecto for even faster web testing at scale. Access the browser permutations you need to test against in the cloud. And move faster with parallel testing and bursting.
Perfecto makes testing with Cypress even better with end-to-end continuous testing support.
See a demo of Perfecto and Cypress.
Get My Demo
DevOps Chief Evangelist & Sr. Director at Perforce Software, Perfecto
Eran Kinsbruner is a person overflowing with ideas and inspiration, beyond that, he makes them happen. He is a best-selling author, continuous-testing and DevOps thought-leader, patent-holding inventor (test exclusion automated mechanisms for mobile J2ME testing), international speaker, and blogger.
With a background of over 20 years of experience in development and testing, Eran empowers clients to create products that their customers love, igniting real results for their companies.