![]() |
| |||||||
Testing Anywhere Post messages and questions related to Testing Anywhere here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
Hello, Please can you tell me if it is possible to round figures up / down to a required number of decimal places in Testing Anywhere? I am using the Variable Operation to calculate the value of one of my Variables and need to round this figure down to 2 d.p. Please can you tell me if there is a function to do this? Thanks and Regards, Claire. |
| |||
|
Hello, Unfortunately, there is no function to round up values in Testing Anywhere. However, we have prepared a sample Test for you which will round up the value. If any value whose decimal is greater than or equal to 0.5 (For example 100.6) is passed, the Test will round up to the higher value (result: 101) and if the value is less than 0.5 (For example 100.2) than the return value will round up to the lesser value(result: 100). Follow below mentioned instructions to run the test: • Save the attached Sampletest.tamn to My Documents\Testing Anywhere\Testing Anywhere\My Projects • Launch Testing Anywhere, select the Test and Run. It will prompt for the decimal value, please select any decimal value in the prompt and hit ok. It will return the rounded up value. Please let us know how it went. |
| |||
|
Hi mzbutt, Attached is the sample which rounds off the decimal values. If the number after the decimal point happens to be greater than or equal to 5 then, the final value will be the number + 1 else, the value will be rounded off to the number before the decimal point. Ex. 48.50 becomes 49 and 48.40 becomes 48. Download and Save the test under 'My Projects'. To locate the path of the 'My Projects' folder, right click on any of the existing tests and select the 'Locate on Disk' option. Hope this helps. |
![]() |
| Thread Tools | |
| Display Modes | |
| |