답변

1

당신은, 예를 들어, Beanshell PreProcessor을에 다음 코드를 사용할 수 있습니다

String hmacSha1 = org.apache.commons.codec.digest.HmacUtils.hmacSha1Hex("secret", "Message"); 
log.info("HMAC SHA1 HASH: " + hmacSha1); 
sampler.setPath("/you/can/put/your/signature/here: " + hmacSha1); 

데모 :

JMeter HMAC SHA1

코드는 Apache Commons Codes 패키지의 일부입니다 HmacUtils 클래스에 의존 어쨌든 JMeter의 일부.


당신은 문제가 단지 HMAC SHA1 서명을 받고, 가장 가능성이 당신이 OAuth에 의해 보호되는 웹 응용 프로그램을 테스트하려고하는 것을 깊은 수 있습니다 그러나. 이 경우 JMeter에서 OAuth를 피하는 대신 몇 가지 더 많은 작업을 수행해야합니다. 자세한 내용은 How to Run Performance Tests on OAuth Secured Apps with JMeter 문서를 확인하십시오.