cancel
Showing results for 
Search instead for 
Did you mean: 

Can i get the SUM of two or more properties which i declared at the test suite level

chathud
New Contributor

Can i get the SUM of two or more properties which i declared at the test suite level

Can i get the SUM of two or more properties which i declared at the test suite level

8 REPLIES 8
nmrao
Community Hero

Re: Can i get the SUM of two or more properties which i declared at the test suite level

Never tried though, see '+'  operator helps



Regards,
Rao.
chathud
New Contributor

Re: Can i get the SUM of two or more properties which i declared at the test suite level

I tryed mate.

But no luck.6-29-2016 11-48-17 AM.png

nmrao
Community Hero

Re: Can i get the SUM of two or more properties which i declared at the test suite level

May be you need to go with Script Assertion?


Regards,
Rao.
gilugopi
Contributor

Re: Can i get the SUM of two or more properties which i declared at the test suite level

This might just work for you. But this kind of property expansion could get pretty messy from a readability standpoint. 

 

${=new BigDecimal(${#TestSuite#PreventiveCount}).plus(new BigDecimal(${#TestSuite#ReactiveCount}))}

 

Good Luck!

Gilu Gopi

 

JKambli
Staff

Re: Can i get the SUM of two or more properties which i declared at the test suite level

Add a script assertion, convert those values to integer, add them and then do assert in script assertion for validation,

https://www.soapui.org/functional-testing/validating-messages/using-script-assertions.html

 

Thanks



Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
gilugopi
Contributor

Re: Can i get the SUM of two or more properties which i declared at the test suite level

@JKambli, agree with you completely. A script assertion is what I would normally do. As this question seemed to be looking for a property expansion sort of solution, suggest one. 

chathud
New Contributor

Re: Can i get the SUM of two or more properties which i declared at the test suite level

Wow , i never thought of something like this.

I will try and let you  know

chathud
New Contributor

Re: Can i get the SUM of two or more properties which i declared at the test suite level

Ooh my goodness, 

This is working perfect.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors