How to convert response time value in Milliseconds in seconds in ReadyAPI
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to convert response time value in Milliseconds in seconds in ReadyAPI
How to convert response time value in Milliseconds in seconds in ReadyAPI
Solved! Go to Solution.
- Labels:
-
Function Tests
-
SOAP
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I assume you are asking how to convert this? There are 1000 milliseconds to 1 second. Or are you looking to make ReadyAPI convert the values for you?
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, I am looking for the feature to convert the response time to seconds instead of milliseconds in readyAPI
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far as I am aware, there's no setting in ReadyAPI to do that for you. You can try putting in for a feature request here and see if that gains traction.
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Is there a way to convert in Groovy Script?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that should be possible. Do you want to access it as a groovy assertion on each test step? Or as a separate groovy test step? What do you want the groovy script to do with the time calculated in seconds?
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looking for a separate way to convert the response time in seconds in Groovey script test step after perform the request
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's some code that should work as a groovy test step. You'll have to have to fill in the test step you care about, but this will get you the response time in seconds.
def testStep = context.testCase.testSteps["ENTER TEST STEP NAME HERE"]
def milliSeconds = testStep.testRequest.response.getTimeTaken();
def seconds = milliSeconds / 1000;
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks its worked
