Forum Discussion

enliven's avatar
enliven
Contributor
16 years ago

"Comment" testStep

Id like to have testSteps which have no other purpose than to break up the list of testSteps, kind of like an hr (horizontal rule). They could also accept a comment as the step data.

The reason for this is we have some testCases which contain over 40 steps and something like this would be very useful for breaking it into 'sections'.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    for your purpose you can do the folowing:
    1. at particular place put Properties TestStep example ( Comment Properties ), and add propertie 'comment'
    2. after it put Groovy TestStep and create script like :

    // create dialog
    def dialog = com.eviware.soapui.support.UISupport.createConfigurationDialog( "Comment" );
    dialog.addTextField( "comment", "enter your comment" );

    // init values and show
    def map = new java.util.HashMap();
    map.put( "comment", "" );

    if( dialog.show( map ))
    {
      // get target step
      def step = testRunner.testCase.getTestStepByName( "Comment Properties" );
    log.info "step ="+step
      // assign
      step.setPropertyValue( "Comment", map.get( "comment" ));
    }
    else testRunner.cancel( "No comment entered!" );


    this way you will be prompted to put Comment and that comment wil be saved in comment propertie of 'Comment Properties' TestStep

    I hope that this is what you asked for

    Also look at our user guide section for more info http://www.soapui.org/userguide/scenari ... ctive.html

    Regards
    Nebojsa
    eviware.com