Node 기반의 E2E Testing Framework
npm trends에서 selenium 을 추격 중으로 사용이 많이 늘어나고 있는 추세
cypress vs nightwatch vs selenium webdriver vs testcafe | npm trends
Compare npm package download statistics over time: cypress vs nightwatch vs selenium webdriver vs testcafe
www.npmtrends.com
아래 7가지의 장점을 갖는다고 한다. (속도는 진짜일까 😒 개인적으로 nightwatch도 빨랐는데)
- Cypress does not use Selenium.
Most end-to-end testing tools are Selenium-based, which is why they all share the same problems. To make Cypress different, we built a new architecture from the ground up. Whereas Selenium executes remote commands through the network, Cypress runs in the same run-loop as your application. - Cypress focuses on doing end-to-end testing REALLY well.
Cypress is not a general automation framework, nor is it a unit testing framework for your back end services. There are already great tools out there that do that. Rather, we specialize in one thing - creating a great experience while you write end to end tests for your web applications. - Cypress works on any front-end framework or website.
Cypress tests anything that runs in a web browser. All of the architecture surrounding Cypress is built to handle modern JavaScript frameworks especially well. We have hundreds of projects using the latest React, Angular, Vue, Elm, etc. frameworks. Cypress also works equally well on older server rendered pages or applications. - Cypress tests are only written in JavaScript.
While you can compile down to JavaScript from any other language, ultimately the test code is executed inside the browser itself. There are no language or driver bindings - there is and will only ever be just JavaScript. - Cypress is all in one.
Writing end-to-end tests takes a lot of different tools to work together. With Cypress you get multiple tools in one. There is no need to install 10 separate tools and libraries to get your test suite set up. We have taken some of the best-in-class tools you are likely already familiar with and made them all work together seamlessly. - Cypress is for developers and QA engineers.
One of our goals was to make test-driven development a reality for end-to-end testing. Cypress is at its best when you use it as you build your application. We give you the power to code as fast as possible. - Cypress runs much, much faster.
These architectural improvements unlock the ability to do TDD with full end-to-end tests for the very first time. Cypress has been built so that testing and development can happen simultaneously. You can develop faster while driving the entire dev process with tests because: you can see your application; you still have access to the developer tools; and changes are reflected in real time. The end result is that you will have developed more, your code will be better, and it will be completely tested. If you opt for our Dashboard Service, parallelization and automated load balancing will further supercharge your test speeds.
사용법
1. 프로젝트 생성 후, npm install cypress을 설치한다.
2. 이후, npm 명령어를 통해 cypress open을 진행하면 아래와 같은 폴더 구조를 생성하면서 실행을 한다. (핵꿀.. 😏😏)
3. 아래 클라이언트에서 Run all specs 을 선택하면, 테스트 브라우져를 통해 테스트를 진행한다.
4. 테스트 중인 화면
selenium이나 nightwatch를 썼을 때 report를 개선하고자 따로 library를 설치했던 기억을 떠오르면,
매우 친절하게 결과를 주는 것 같다.
앞으로도 써보고, 사용 후기를 정리해보려고 한다.
doc : docs.cypress.io/
github : github.com/cypress-io/cypress
cypress-io/cypress
Fast, easy and reliable testing for anything that runs in a browser. - cypress-io/cypress
github.com
'Automation > Cypress' 카테고리의 다른 글
data-cy (0) | 2021.04.25 |
---|---|
cypress-file-upload (0) | 2021.03.05 |
commands (0) | 2020.12.02 |
sibling, parent (0) | 2020.11.26 |
Element (0) | 2020.10.13 |