why Cypress

코드위의승부사·2020년 8월 14일
0

Cypress는 E2E테스트, 통합테스트, 유닛테스트 가능하다.
실제로 효과가 있는 테스팅 프로세스를 추구한다.

특징

  • Time travel : snapshots. 각 스텝의 커맨드 로그를 확인해 어떤일이 있는지 알 수 있다.
  • Debuggability : Developer tools과 유사. readable errors and stack traces
  • Automatic Waiting : commands & assertion하기전에 자동적인 wait
  • Spies, Stubs, Clocks : verify and control 함수의 기능, 서버 응답, 타이머. 유닛테스트와 유사한 기능들
  • Network Traffic Controls : stub, 테스트의 엣지 케이스를 서버와 관련없이 쉽게 Controls.
    you can stub network traffic however you like
  • Consistent Results : flake-free
  • Screenshots and Videos :
  • Cross browser Testing

Key Differences

Architecture

대부분 테스팅 툴은 브라우저의 외부에서 작동되고 네트워크를 통해 명령을 실행하는 방식으로 작동하지만 Cypress는 정반대이다.

Native access

Whether it is the window, the document, a DOM element, your application instance, a function, a timer, a service worker, or anything else - you have access to it in your Cypress tests.

New kind of testing

Having ultimate control over your application, the network traffic, and native access to every host object unlocks a new way of testing that has never been possible before.

Shorcuts

prevent act like a user
With Cypress you can programmatically interact and control your application. You no longer have to use your UI to build up state.
That means you do not have to visit a login page, type in a username and password and wait for the page to load and/or redirect for every test you run.

Flake resistant

Cypress will pause command execution until the following page is fully loaded. You can even tell Cypress to wait on specific network requests to finish.

Debuggability

Trade offs

test with local sever

profile
함께 성장하는 개발자가 되고 싶습니다.

0개의 댓글