-
Apache JMeter 5.6.3 (mac m1) 설치 및 http요청 사용기카테고리 없음 2024. 7. 7. 17:04
성능 테스트를 위해 Apache JMeter를 다운받았다. (.zip)
https://jmeter.apache.org/download_jmeter.cgi
Apache JMeter - Download Apache JMeter
Download Apache JMeter We recommend you use a mirror to download our release builds, but you must verify the integrity of the downloaded files using signatures downloaded from our main distribution directories. Recent releases (48 hours) may not yet be ava
jmeter.apache.org
알집을 적절히 풀고 bin에 들어가 ./jmeter실행하면
Apache JMeter 가 실행됨
1. Test Plan 우클 > add > Threads > Thread Group
Thread group 추가
- Number of Threads
쓰레드수(사용자수)
- Ramp-Up Period(초)
모든 쓰레드가 시작되는 데 걸리는 시간을 설정, Ramp-Up Period 동안 설정된 쓰레드 수가 점진적으로 증가
- Loop Count
각 쓰레드가 실행할 요청의 반복 횟수를 설정, 이를 통해 각 사용자가 동일한 테스트를 여러 번 수행하게 할 수 있음
- Number of Threads: 100 (100명의 가상 사용자)
- Ramp-Up Period: 20초 (20초 동안 점진적으로 100명의 사용자가 시작)
- Loop Count: 5 (각 사용자가 로그인 요청을 5번 반복)
2. Thrad Group 우클 > add > Sampler > Http Request
http, servername or ip, port 경로 입력
json의 경우 Body Data 추가 후
아래 3번 순서 헤더설정 필요
3. 헤더설정
Http Request 우클 > add > config Element > Http Header Manager
Content-type application/json
Authorization token
4. 각 결과 보고서
이제 준비 끝
위 초록색 재생버튼 누르면 시작
실행중 우측 상단에 스레드 남은 개수 및 시간 확인
종료 후 결과 보고서
800개이상주면 오류난다.