Report folder name

34 views
Skip to first unread message

Iryna Hryshanovich

unread,
Sep 2, 2020, 3:10:18 PM9/2/20
to getgauge
Hello guys

I use Gauge with Python. After every test run the separate html-report is generated with a unique folder name for excample '2020-08-31 14.46.02':
In log file I see message:
Successfully generated html-report to => /Users/irynah/GaugeTestFolder/gauge-tests/reports/html-report/2020-08-31 14.46.02/index.html

How can I get this folder's name? In documents, I see that I can only specify folder location in the properties file 

Thank you
Regards,
Iryna

Iryna Hryshanovich

unread,
Sep 2, 2020, 9:35:25 PM9/2/20
to getgauge
I found one solution which would work for me. I can create a folder with a unique date and time using this command:

gauge_reports_dir=myReport/testResults/$(date +"%Y%m%d-%H%M%S") gauge run specs

it is working only on Mac. On Windows, if I use the similar command :

gauge_reports_dir=newReportsDir gauge run specs

I received the error:
'gauge_reports_dir' is not recognized as an internal or external command,
operable program or batch file.

I have gauge_reports_dir = newReportsDir in my default.properties file. What could cause this error?

thank you


Iryna Hryshanovich

unread,
Sep 3, 2020, 2:27:57 PM9/3/20
to getgauge
I found the solution for Windows in past conversations. I post it here just in case if someone needed it

for Windows:
- Remove/comment the gauge_report_dir value set in the default.properties file. (Important!)
- set gauge_report_dir=<your directory> as environment variable, and run gauge specs

set datestr=%date:~-4,4%%date:~3,2%%date:~-10,2%%time:~0,2%%time:~3,2% && set gauge_reports_dir=C:\Jenkins\workspace\Tests\%datestr% && gauge run specs

Srikanth V

unread,
Sep 3, 2020, 11:32:13 PM9/3/20
to getgauge
Glad you sorted this out. Thanks for sharing your solution.

warm regards
Srikanth
Reply all
Reply to author
Forward
0 new messages