Forum Discussion

danomano's avatar
danomano
New Contributor
16 years ago

Why is this trival script failing? (groovy supports transparent string to int..)

so..I'm a total noob to soapUI, just started looking at it today..so please bear with me..

The script below fails on line 6 with the error:

groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.support.XmlBeansPropertiesTestPropertyHolder$PropertiesStepProperty.plus() is applicable for argument types: (java.lang.Integer) values: [1]

** Where id is a property defined in the Properties Test Step.

1) req = testRunner.testCase.getTestStepByName("Properties");
2) id = req.getProperty("id");
3) if (id == null) {
4)    id = 999;
5) }
6) id = id+1;


Am I missing something? shouldn't this work?

3 Replies

  • i think the code for line 4 should be something like

    id.setValue("999")

    and line 6 should be

    id.setValue(Integer.toString(id.getValue().toInteger() + 1))
  • danomano's avatar
    danomano
    New Contributor
    Sure enough..I'm a bit confused, what is req.getProperty("ssss")

    returning? obviously its not a string, or an int.

    I didn't see anything in the documentation that says what it returns? I had assumed it was a 'string'..obviously an incorrect assumption.
  • it returns an object that implements the TestProperty interface or one of its subinterfaces.