Forum Discussion
nmrao
2 years agoChampion Level 3
How does the response look like? Sample would help to understand.
Of course, one can read the response of any test step(s) in groovy step
import com.eviware.soapui.impl.wsdl.teststeps.*
// Get the gRPC request test step - change if the step name is different
def grpcStep = testRunner.testCase.getTestStepByName("gRPC Request")
// Get the gRPC response message
def grpcResponse = grpcStep.testRequest.responseContent
// Parse the response message as a byte array
def responseBytes = grpcResponse.getBytes()
// Deserialize the response message using Protocol Buffers
def responseMessage = MyProtoMessage.parseFrom(responseBytes)
// Print the response message
log.info "Response message: $responseMessage"
Related Content
- 2 years ago
- 6 years ago
- 10 months ago