This is a migrated thread and some comments may be shown as answers.

Verification math?

1 Answer 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Si
Top achievements
Rank 1
Si asked on 26 Nov 2018, 02:43 PM

Hi,

I'm trying to verify calculations done against the inputs in certain text boxes. Is there a way to do this?

 

For example 

Text Box 1 = 5.43

Text Box 2 = 6.00

Text Box 3 = 11.43

 

I need to be able to verify that the calculation (in this case a sum) of Text Box 1 and 2 are correct in #3, not matter what the value of Text Boxes 1 and 2 are.

 

Thanks!

Si

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 27 Nov 2018, 09:37 AM
Hello Si,

Test Studio allows you to extract the value of any element to a variable and then use it later in the test as per the requirements. In this scenario you could use the variables extracted from Box 1 and Box 2 in a coded step to get their sum stored to a third variable. For this you will need how a variable is set in code.

Then, you can use the last variable, which represents the sum, back in the test steps and data bind the verification step to verify the value of Box 3. Please note that the variable set in code will not be present in the step property UI, but still you can use it - please see point 10. in this article

I hope the above approach will suit your needs. Of course, if you have any questions, please do not hesitate to get back to me. 

Regards,
Elena Tsvetkova
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Si
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or