행복한 시지프

  • 홈
  • 삶에 대한 생각
  • 기술

fixtures 1

[Cypress] API Mocking 하기

Cypress로 테스트하다 보면, API를 Mocking하여 처리해야할 일이 생긴다. 다음과 같은 이유가 있다. 1. public api 를 이용할 때는 할당량이 있는 경우가 있어서, 테스트에 할당량을 낭비하지 않기 위해서 2. private api의 경우에도 서버 비용이 발생하기 때문에 Cypress는 공식 문서가 매우 잘 돼있기 때문에, 가급적 공식문서 읽기를 추천한다. API Mocking은 특히 intercept 개념을 읽으면 된다. https://docs.cypress.io/api/commands/intercept intercept | Cypress Documentation Spy and stub network requests and responses. Tip: We recommend you r..

Tech/Sofeware Development 2022.03.21
이전
1
다음
더보기
프로필사진

행복한 시지프

Software engineer, Educator @Woowabros

  • 분류 전체보기 (80)
    • Tech (27)
      • Sofeware Development (19)
      • Clean Code (4)
      • Algorithm (0)
      • 우아한테크코스 (4)
    • Writing (50)
      • 삶에 대한 생각 (28)
      • 책 (3)
      • 회고 (17)
      • Self integrity report (2)
    • Education (2)

방문자수Total

Copyright © Kakao Corp. All rights reserved.

  • Github

티스토리툴바