Page 1 of 1
How to upload Ranorex report in TeamCity?
Posted: Wed Dec 04, 2013 10:26 am
by vadim
Hi,
I'm trying to make Ranorex report visible in TeamCity Build-level Report Tab.
Here is TeamCity instruction how to add HTML report:
http://confluence.jetbrains.com/display ... ld+Results
Ranorex report folder (including index.html, index.html.data and other generated files) is successfully stored as build artifact.
The issue is that when I open Report tab I see the following message:
Data file (index.html.data) or transformation file is missing.
Does anyone tried such method or any other method to upload Ranorex reports in TeamCity?
Or maybe it is possible to merge index.html and index.html.data in 'single' index.html file?
Thanks in advance for help.
Re: How to upload Ranorex report in TeamCity?
Posted: Fri Dec 06, 2013 4:09 pm
by Support Team
Hello vadim,
I am not sure if TeamCity can handle Report Data files (*.html.data) since our Data file is not based on html.
I would recommend to contact the Support Team for TeamCity to ask if this is possible.
Regards,
Markus (T)
Re: How to upload Ranorex report in TeamCity?
Posted: Mon Dec 09, 2013 2:31 pm
by vadim
Hi Markus,
Thanks, I will try to contact TeamCity support.
Cheers,
Vadim
Re: How to upload Ranorex report in TeamCity?
Posted: Wed Dec 11, 2013 2:12 pm
by ekirmayer
Hi,
Did you get an answer from TeamCity team about the reports?
Can this be done?
Thanks
Re: How to upload Ranorex report in TeamCity?
Posted: Thu Dec 19, 2013 8:41 am
by vadim
Hi, unfortunately, I din't get answer on TeamCity forum.
Re: How to upload Ranorex report in TeamCity?
Posted: Mon Dec 23, 2013 2:11 pm
by BernhardS
Hello vadim,
I am not exactly sure if this works, but would it be possible to rename the *.data file to *.data.html and upload it to Team City? After uploading the file, you can try to rename it back to *.data.
Regards,
Bernhard
Re: How to upload Ranorex report in TeamCity?
Posted: Thu Jul 30, 2015 8:43 pm
by JohnWashburn
The work around is
1) Capture the Ranorex report elements as artifacts of the build execution.
2) One of the last build last steps of the build configuration renames any files within the artifacts directory with .rxlog in the name by replacing .rxlog with .html. The two files affected are:
<ReportLogFilename>.rxlog -> <ReportLogFilename>.html
<ReportLogFilename>.rxlog.data -> <ReportLogFilename>.html.data
3) Create an HTML tab (we named it RanorexReport) as part of the build configuration which takes the artifacts as its source.
Now TeamCity will display a tab to the left of the artifacts tab and is just coughing up an HTML page in its frame.
Re: How to upload Ranorex report in TeamCity?
Posted: Mon Sep 21, 2015 7:10 am
by JohnWashburn
The final post processing we used was a TeamCity build step using the power shell runner with the following power shell script:
Code: Select all
trap
{
write-output $_
##teamcity[buildStatus status='FAILURE' ]
exit 1
}
#Creates the index file to organize multiple reports
$indexHTML = "%RANOREX_REPORT_DIR%\index.html"
$Head = '<head><title>Report Index</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<style>
TABLE{width: 60%;border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}
TH{border-width: 1px;padding: 3px;border-style: solid;border-color: black;background-color:#bbcbdf}
TD{border-width: 1px;padding: 3px;border-style: solid;border-color: black;}
tr:nth-child(odd) { background-color:#ececec;}
tr:nth-child(even) { background-color:white;}
.Success {color:#44B049;}
.Failed {color:#D84840;}
</style></head>'
$Body= "<body align='center'><h1>Report Index</h1><table align='center'><tr><th>Test Suite</th><th>Status</th></tr>%REPORT_TABLE%</table></body>"
ConvertTo-Html -Head $Head -Body $Body | Set-Content $indexHTML
cd %RANOREX_REPORT_DIR%
Get-ChildItem -Filter "*rxlog*" -Recurse | Rename-Item -NewName {$_.name -replace 'rxlog','html' }
Which does 2 things:
1) it creates an HTML file named Index.html to use as the page to be displayed within the tab named: Ranorex View.
2) renames the Ranorex reporting files which contain HTML code from rxlog to html so any browser can display the results.