I am testing the load performance for my application. am calculating the time for table load and storing it in variable. Now I want to display that readings in the report. Could u pls help me here?
This is my code -
long start2 = System.currentTimeMillis();
long finish2 = System.currentTimeMillis()
long totalTime2 = finish2 - start2
long Seconds = (totalTime2 /1000)
System.out.println(“Total Time for page load - “+Seconds +” Seconds”)
You can use KeywordUtil and create a log for it to be displayed in the report.
KeywordUtil log = new KeywordUtil()
log.logInfo(“Total Time for page load - “+Seconds +” Seconds”)
Hope that helps. . .
but still it is not showing the value for Variable ‘Seconds’ in the report.
Can you share some screenshots? thanks
Yes…Please find screensots-
Hmmmmm that looks weird… I’m using KeywordUtil class and whenever I used it, logs are being displayed in the report.
I’m starting to think that it might be a version issue or some settings. But I may be wrong.
try this another logger class
KeywordLogger logger = new KeywordLogger()
Hope that works now. . .
Nothing fancy but you can also use:
WebUI.comment("Total Time for page load - "+Seconds +" Seconds")
@grylion54 / @Arnel
Still I am not able to display value in report. Here is the screenshot-
I have used the below statement -
WebUI.comment((‘\nTotal Time for page load after clicking on GlideUI Link - ’ + SecondsAfterDftDisTab) +
Am I missing any steps?
Also I used KeywordLogger, but still no luck:(
I guess, you have changed
log configuration of your project, which could affect the log output.
Could you share the content of
Include > Config > file?
This is the content of log.properties file -
# This file is used to configure Katalon Studio execution log levels.
# When you need to troubleshoot Katalon Studio issue
log.properties file has nothing harmful.
Does your test code use any the logging framework
Now I am able to see the value for Variable in report but in
PDF format only. Thats okay!!!
Thank You so much guys
That’s Great! Glad it works.