artillery 서버부하 테스트

김기태·2021년 10월 14일
0

npm i artillery - 서버 부하테스트

quick은 ab처럼 특정 URL에 간단하게 스트레스를 보내고 싶을 때 사용하는 기능이다

quick --duration 60 --rate 10 -n 20
*60초 동안 테스트를 하는데 초당 10 요청을 보내고 동시 접속은 20명

config를 사용해서 시나리오를 만들 수 있음

artillery run -o registTest.json my-script.yaml - test결과 registTest.json으로 만들기

artillery report registTest.json - registTest를 html로 만들기

scenarios

config:
  target: 'http://localhost:5000'
  phases:
    - duration: 10
      arrivalRate: 10
scenarios:
  # 메인페이지 조회
  - flow:
      - get:
          url: '/main'
      # 토탈 검색페이지 결과 조회
      - get:
          url: '/search/pages/1/total?result=카페'
      # 조건 검색 결과페이지 조회
      - get:
          url: '/search/condition?weather=1&category=3&num=1&gender=3'
      # 조건 검색 상세페이지 조회
      - get:
          url: '/search/pages/1/condition?weather=2&category=3&num=1&gender=3&inside=1'
profile
김개발

0개의 댓글