Ross
Ross

Reputation: 2417

SoapUI property transfer converting value to float when trying to add an integer

I have a property transfer set up in one of my test cases and what I am trying to do is get a value from a response as xml and add 1 to that value and then transfer it to a customer property for that test case.

In the source section I have:

//user_school_id

This transfers the following value:

52

However when I use the following:

//user_school_id + 1

It transfers:

53.0

This breaks the downstream test steps as they are expecting an integer

Upvotes: 1

Views: 405

Answers (1)

craigcaulfield
craigcaulfield

Reputation: 3538

You could use the string representation of the sum, such as:

string(//user_school_id + 1)

This will transfer the literal value.

Upvotes: 3

Related Questions