Forum Discussion
6 Replies
Sort By
- nmraoChampion Level 3Have you tried trimming zeros from while getting value from db?
- SubratsinghOccasional ContributorWant to do that, but not knowing how to do this as I'm new to this SoapUI and groovy scripting.
- nmraoChampion Level 3Are you still anchored there with the problem?
Please see if the below link works for you?
http://www.stata.com/support/faqs/data- ... ing-zeros/ - JimLinOccasional ContributorI use this in a Groovy step. You can adjust the number of digits by increasing or decreasing the -3:
// Remove trailing zeros
def firstDepositMinusZero = firstDeposit[0..-3] as int - SubratsinghOccasional ContributorThanks Jim that worked for me. Sorry, was on vacation hence the delay in response
I need your thoughts on this,
I've a requirement where in I need to assert the XML response node val. The val basically is the average of 3 column values fethched from a DB query. To be precise, the 3 column values are fetched from 3 different queries. I need to assert the average of these 3 column vals and assert with the xml node respose. How to do this, I understand I need to fetch these 3 column values to 3 variables and then do the script assertion to calculate the average and assert. But not knowing the steps in SoapUI pro, can you please suggest? Thank you! - SmartBear_SuppoSmartBear Alumni (Retired)Try this point-and-click functionality that you can use in your Groovy script assertion to get the XML values: http://www.soapui.org/Working-with-soap ... ovy-script
Then you can do a simple assert - e.g. http://www.soapui.org/Functional-Testin ... tions.html
Michael Giller
SmartBear Software