Forum Discussion

Carlos1__'s avatar
Carlos1__
New Contributor
3 years ago

getTestStepsOfType and AMQPPublishTestStep

Hello Everyone,

 

i have in my code:


else if ( typeToExecute.equals("AMQP") ) {
soapuiRequests = testCaseExecuted.getTestStepsOfType(AMQPPublishTestStep);

but soapuiRequests = testCaseExecuted.getTestStepsOfType(AMQPPublishTestStep) is not correct, i need help for combinet getTestStepsOfType and AMQPPublishTestStep.

thanks for all

1 Reply

  • KarelHusa's avatar
    KarelHusa
    Champion Level 3

    Carlos1__ ,

    normally should work:

     

    testCaseExecuted.getTestStepsOfType(AMQPPublishTestStep.class)

     

    For some reason there are issues within Groovy to import the class com.smartbear.amqp.steps.AMQPPublishTestStep.

     

    As a workaround you could use:

     

    steps = tc.getTestStepList()

    steps.each {
    step = it
    if (step.class.getName().endsWith("AMQPPublishTestStep")) {
    log.info it.getName()
    }
    }

    Anyway the plugin does not publish it's SDK as far as I know, so things may change in the future.

     

    Best regards,

    Karel