Forum Discussion

sumambo's avatar
sumambo
Occasional Contributor
15 years ago

Cant find soapUiRunner.groovy file under script-components

Hi, I am trying to find the soapUiRunner.groovy file corresponding to the soapUiRunner component. I am aiming to add an output port , so the incoming event can be forwarded to some other component on successful execution of a soapui runner step.

7 Replies

  • sumambo's avatar
    sumambo
    Occasional Contributor
    So in that case, how should I import the component into the working instance of loadui, could you please clarify ..thx
  • sumambo's avatar
    sumambo
    Occasional Contributor
    Hi Ole,
    Another workaround for modifying the java class could be creating a 'SequenceConnector' ... the input to the connector would be from the 'Result' output of the SoapUiRunner ... in that case , it would need to send an event in output as per the following logic.


    createInput( "input", "Individual Result From the SoapUiRunner" )
    createOutput( "output", "Outgoing Trigger Event" )


    onMessage{
    incoming, outgoing, message ->
    // Assuming th soapUi request succeeded since this is at the Result output

    outEvent = createEvent()

    send( output, outEvent );
    }

    }

    Please help me figure out how to create an event and send it through the output. I looked at the FixedRateController.groovy and found the 'schedule' method,but I am not sure how the triggered event can be bound to that output.
  • Hi!

    the code you have created seems ok to me, just add the desired values to your outgoing message, ie

    outEvent["SomeProperty"] = someValue
    ...

    Or am I misunderstanding?

    regards!

    /Ole
    eviware.com
  • sumambo's avatar
    sumambo
    Occasional Contributor
    its the createEvent function that i would need your help for ... as in
    1> How to instantiate an event ... is it => def newEvent = { trigger() }
    2> What property to set so that it can trigger a soapuirunner , if a property needs to be set at all.
  • Hi!

    oh.. sorry.. ;

    1) Create the event by calling newMessage() :

    event = newMessage()

    2) No, runners don't require any special properties in an incoming event to be triggered, an empty event will do! This means that you can connect the result output of an existing runner directly to another runner if you always want to trigger another testcase after the first one, but if you only want to trigger when the first runner succeeds you need a component (like yours) that checks the incoming message for a successful result before sending a new trigger message

    Hope that makes sense!

    regards,

    /Ole
    eviware.com