Gatling JMS Check bodyBytes IBM500
Spam Alert: This post is marked as spam by our system . So it can't be shown in homepage! Administrators will review as soon as possible. If you have any problems, please send us your feedback.
https://docs.gatling.io/reference/script/core/checks/#bodybytes
bodyBytes sẽ trả về response body kiểu byte array, mình dùng hàm transform để convert bytes về String sau đó validate
.check(bodyBytes.transform(bytes => new String(bytes, "IBM500").contains("Successful")).is(true))
Ví dụ:
val scn = scenario("JMS DSL test").repeat(1) {
exec(jms("req reply testing")
.requestReply
.queue("jmstestq")
.textMessage("request message from gatling jms")
.jmsType("BytesMessage")
.check(bodyBytes.transform(bytes => new String(bytes, "IBM500").contains("Successful")).is(true))
}
Check dạng bodyBytes transform dùng khi message nhận về dạng byte array
All Rights Reserved