08. Artillery를 사용한 부하 테스트(Stress Test)

1. node.js  PC 설치

https://nodejs.org/dist/v20.10.0/node-v20.10.0-x64.msi

 

2. node Artillery 설치

https://www.artillery.io/

 

Artillery.io | Cloud-scale Load Testing

Keep production reliable, customers happy, and pagers silent.

www.artillery.io

 

3.vs code terminal 에서 설치하기

artillery-scripts 폴더 생성

terminal -> npm install -g artillery

새파일 생성 -> cpu-test.yaml

https://gist.github.com/lleellee0/966c6922099c650982577359bb08b5b7  붙여넣고 ip 바꾸기

 

* Artillery 스트레스 테스트 스크립트 (cpu-test.yaml)
config:
  target: "http://ip/"
  phases:
    - duration: 60
      arrivalRate: 1
      name: Warm up
scenarios:
  # We define one scenario:
  - name: "just get hash"
    flow:
      - get:
          url: "/hash/123"

 

4. vscode terminal

artillery.cmd run --output report.json .\cpu-test.yaml

 

5. report.json을 html로 바꾸기

artillery.cmd report .\report.json

start .\report.json.html

 

 

'백엔드 프레임워크 & 언어 > Tools & Environment' 카테고리의 다른 글

10. sourcetree 설치  (0) 2023.12.27
09.git 설치  (0) 2023.12.27
07.웹 서버 구성  (0) 2023.12.27
06. GCP에 docker 설치  (0) 2023.12.26
05. Google GCP 계정 만들기  (0) 2023.12.26