Forum Discussion

richie's avatar
richie
Community Hero
8 years ago

DataLoop Not Working When Any Steps Fail??

Hi,

Ok - I have the following hierarchy

 

DataSource(Directory) with fileContents Property defined - 3 files containing data on network
POST REST step (posting ${#Datasource#fileContents} property)
Groovy Step (extracting CustRefID property from file)
Properties Step (holds CustRefID property value)
GET REST step (get request with ${#Properties#CustRefID})
Datasource Loop (loops back to POST REST step)

I have a Datasource (directory) type that points to a directory with 3 test data files that contain a single line of data. I have 3 files so the testcase executes 3 times.

 

I have 2 assertions on the GET REST request step.  If both assertions pass (i.e. the test doesn't fail) - the loop works fine - i.e. the test case is executed 3 times.  If the assertions on the step fail - the loop executes only once.

 

I thought this was just for the GET request at first - but if any assertions on the POST fail to execute, the loop also fails.

 

To reiterate - the Datasource Loop works fine when the assertions pass execution - but if there are any assertions on within the test case fail, the looping stops working - that is, the test executes only once.

Is there anyway I can configure SoapUI to continue to execute, despite failed assertions?  If the loop fails if any assertion fail, this is really going to slow my testing down. 

 

Many thanks to all,

 

richie

 

  • I'm an idiot.

     

    As soon as I'd posted this - I found what I need.

     

    The answer: - launch the options associated to the Testcase.  There is a checkbox options - 'Abort test if error occurs'  

     

    Untick this checkbox (is checked by default) - and the loop executes fine

     

    Apologies for wasting anyone's time!

     

    richie

  • richie's avatar
    richie
    Community Hero

    I'm an idiot.

     

    As soon as I'd posted this - I found what I need.

     

    The answer: - launch the options associated to the Testcase.  There is a checkbox options - 'Abort test if error occurs'  

     

    Untick this checkbox (is checked by default) - and the loop executes fine

     

    Apologies for wasting anyone's time!

     

    richie

    • groovyguy's avatar
      groovyguy
      Community Hero

      Glad you found that. I was going to point it out but didn't get a chance to reply earlier.