개발/꿀팁

부하테스트 | ngrinder, jmeter로 간단히 해보기 (맥북 M1)

ttoance 2022. 11. 6. 18:01

ngrinder

참고 블로그 : https://blog.naver.com/wideeyed/222173944239

 

[nGrinder] 성능 테스트하는 방법

네이버에서 유지보수하고 있는 성능 테스트 툴 nGrinder에 대해 알아보겠습니다. nGrinder는 애플리케이...

blog.naver.com

 

1. ngrinder 설치 https://github.com/naver/ngrinder/releases/

 

Releases · naver/ngrinder

enterprise level performance testing solution. Contribute to naver/ngrinder development by creating an account on GitHub.

github.com

2. ngrinder 실행 : java -jar ngrinder-controller-3.5.3.war --port=8300

 

3. 최초 로그인이라면 id : admin | pw : admin 으로 로그인

 

4. 스크립트 작성 : Scripts 탭에서 Create > Create a script 클릭

여기에 원하는 사이트를 넣는다.

 

5. 그 다음 화면에서 validate 통해 오류 안 날때까지 수정해야함

 

에러 1️⃣  java.lang.IllegalArgumentException: Unsupported class file major version 60

자바 버전때문에 발생하는 오류로 자바 버전 바꿔줌

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
source ~/.bash_profile

에러2️⃣  Unrecognized record version TLS-0.0 , plaintext connection

https → http 로 수정해줌

 

6. agent를 띄워주기 위해 agent를 다운받아서 실행시켜주어야 함.
- Download agent
- tar -xvf ngrinder-agent-3.5.7-localhost.tar 로 압축 해제
- cd ngrinder-agent
- ./run_agent.sh 로 agent 실행

 

 

7. 6번까지 해주면 Agent Management에 목록이 나옴. Approved 해주고

 

8. 이제 성능테스트하러 Performance Test에서 Create Test 실행

 

9. 돌리면 아래처럼 결과 확인 가능

TPS : Tranjaction Per Second 초당 트랜잭션 수

ngrinder 공식 포럼 http://ngrinder.373.s1.nabble.com/

 

ngrinder

ngrinder developer mailing list 74 112 Ask a question about ngrinder in English. Click "Options > Subscribe via email" to subscribe to this mailing list; Click "Options > Post by email..." to get the email address of this mailing list; You can post message

ngrinder.373.s1.nabble.com

 

jmeter

참고 블로그: https://zemba.tistory.com/68

 

Jmeter 사용법 (Mac)

개발을 진행하고나서 프로그램이 성능이 얼마나 괜찮은지를 확인하려고할때 가장 많이 사용하는 성능테스트 도구로 Jmeter를 사용한다. 다양한 테스트 방법들이 있지만 이번 포스팅에서는 가장

zemba.tistory.com

 

3. 아래 순서대로 진행한다.
- 테스트 케이스 추가
- Thread Group 추가
- Http Request 추가
- Listener 추가

 

4. 실행 후 확인하면 아래처럼 결과 확인됨.

반응형