I am currently customizing our reports to show more relevant information. Everything was going great so far until I tried to reuse the custom report.
Our solution has quite some projects which all refer to a single module library. So I thought the module library was the best location to place the customized report. This way every project would be able to easily use the report template.
I got to the point where Ranorex even correctly copies the template to the output folder of every project. Unfortunately I can't figure out how to configure the individual projects/test suites so that they use the custom report. When trying to select the template folder from the module library, Ranorex complains about that folder being outside of the project directory.
I really don't want to clutter all our projects by copying the *.xsl, *.css and *.png etc. around. Is there something obvious I did wrong?
Reusing Custom Reports from module library
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Reusing Custom Reports from module library
Hello ArneW,
Thank you for your post.
First of all, please make sure to update Ranorex to our latest version, currently Ranorex 8.2.1. We fixed several issues, also related to specified report paths. Afterwards, simply specify the template folder within the Ranorex TestSuite settings:
I hope, this information helps.
Sincerely,
Robert
Thank you for your post.
First of all, please make sure to update Ranorex to our latest version, currently Ranorex 8.2.1. We fixed several issues, also related to specified report paths. Afterwards, simply specify the template folder within the Ranorex TestSuite settings:
I hope, this information helps.
Sincerely,
Robert
You do not have the required permissions to view the files attached to this post.
Re: Reusing Custom Reports from module library
Hi,
Sorry for the delay. I made sure to update Ranorex to the latest version now.
Unfortunately our issue did not resolve. To better show my intended use case I quickly built a solution roughly like ours:
Please note that we don't deploy the output folder of our module library, just the output folder of our TemplateSampleProject.
I expected this to work but I am afraid it doesn't. We need this because copying our template around is just not feasible and honestly feels like a workaround when this is what the module library should be there for.
Sorry for the delay. I made sure to update Ranorex to the latest version now.
Unfortunately our issue did not resolve. To better show my intended use case I quickly built a solution roughly like ours:
Please note that we don't deploy the output folder of our module library, just the output folder of our TemplateSampleProject.
I expected this to work but I am afraid it doesn't. We need this because copying our template around is just not feasible and honestly feels like a workaround when this is what the module library should be there for.
You do not have the required permissions to view the files attached to this post.
Re: Reusing Custom Reports from module library
Please also note, that all items from the "MyTemplate" folder get correctly copied to the output folder of the TemplateSampleProject:
PS Sorry for the double post. I somehow can't attach more than one screenshot.You do not have the required permissions to view the files attached to this post.
Re: Reusing Custom Reports from module library
Hello ArneW,
You can use a relative path: This will copy the custom report folder to the output of "TemplateSampleSolution" from "TemplateSampleLibrary" and also use the same template when the report of the "TemplateSampleSolution" is created. All this without having to have a "MyTemplate" folder in the project "TemplateSampleSolution"
You need to type the path manually. Ranorex Studio will else always write an absolute path.
Does this help?
Regards,
McTurtle
You can use a relative path: This will copy the custom report folder to the output of "TemplateSampleSolution" from "TemplateSampleLibrary" and also use the same template when the report of the "TemplateSampleSolution" is created. All this without having to have a "MyTemplate" folder in the project "TemplateSampleSolution"
You need to type the path manually. Ranorex Studio will else always write an absolute path.
Does this help?
Regards,
McTurtle
You do not have the required permissions to view the files attached to this post.
Re: Reusing Custom Reports from module library
Hi,
No, unfortunately that also doesn't really fix the issue. Moving the output folder of TemplateSampleSolution around before executing it leads to this error: Where D:\Workspace\Testfolder\ ist the path I am executing the compiled output from. Obviously Ranorex can't find the folder of TemplateSampleLibrary from there.
I assume the processed content of TemplateSampleProject.rxtst is a bit off on this:
Ranorex seems to always prepend ..\..\ internally no matter what I enter into the template selection box.
Any other idea to make this work?
Greetings,
Arne
No, unfortunately that also doesn't really fix the issue. Moving the output folder of TemplateSampleSolution around before executing it leads to this error: Where D:\Workspace\Testfolder\ ist the path I am executing the compiled output from. Obviously Ranorex can't find the folder of TemplateSampleLibrary from there.
I assume the processed content of TemplateSampleProject.rxtst is a bit off on this:
<testsuite ReportTime="RelativeToTestSuiteStartTime" TracingScreenshotMode="Foreground" TracingScreenshotQuality="40" enabletracingscreenshots="True" id="cd534c05-94e0-49a8-a3a5-844dea530d66" name="TemplateSampleProject" placescreenshotsinfolder="True" reportcompress="False" reportfilename="%S_%Y%M%D_%T.rxlog" reporttemplatefolder="..\..\..\TemplateSampleLibrary\MyTemplate" reportwriteinterval="30000ms" showinvisiblechars="True"> </testsuite>Manually fixing it to
<testsuite ReportTime="RelativeToTestSuiteStartTime" TracingScreenshotMode="Foreground" TracingScreenshotQuality="40" enabletracingscreenshots="True" id="cd534c05-94e0-49a8-a3a5-844dea530d66" name="TemplateSampleProject" placescreenshotsinfolder="True" reportcompress="False" reportfilename="%S_%Y%M%D_%T.rxlog" reporttemplatefolder="MyTemplate" reportwriteinterval="30000ms" showinvisiblechars="True"> </testsuite>makes the report work correctly but that of course would get overwritten on each build.
Ranorex seems to always prepend ..\..\ internally no matter what I enter into the template selection box.
Any other idea to make this work?
Greetings,
Arne
You do not have the required permissions to view the files attached to this post.
Re: Reusing Custom Reports from module library
Hey Arne,
If this is what you want
Ok, another suggestion:
1. When building the test suite Ranorex needs to know where to take the report template from. Therefore, you need to have this setting in the Report settings:
2. In the program.cs you can override the setup of the reporting environment by adding the following around line 35 before the try-catch:
Does it also help you?
Sincerely,
McTurtle
If this is what you want
Ok, another suggestion:
1. When building the test suite Ranorex needs to know where to take the report template from. Therefore, you need to have this setting in the Report settings:
2. In the program.cs you can override the setup of the reporting environment by adding the following around line 35 before the try-catch:
TestReport.Setup(ReportLevel.Info,"",true,"./MyTemplate");This works for me, even when moving around the output folder.
Does it also help you?
Sincerely,
McTurtle
You do not have the required permissions to view the files attached to this post.
Re: Reusing Custom Reports from module library
Hi McTurtle,
Thanks for all your effort.
I added the setup code to my Program.cs just where you said it should be and set the relative path in my settings too. Unfortunately I am still not able to move my output around while keeping custom reports working at the same time.
I attached my current sample solution. Maybe you can figure out what I am still missing there.
Thanks again for going through the trouble. I really appreciate the great support!
Thanks for all your effort.
I added the setup code to my Program.cs just where you said it should be and set the relative path in my settings too. Unfortunately I am still not able to move my output around while keeping custom reports working at the same time.
I attached my current sample solution. Maybe you can figure out what I am still missing there.
Thanks again for going through the trouble. I really appreciate the great support!
You do not have the required permissions to view the files attached to this post.
Re: Reusing Custom Reports from module library
Hey Arne,
I could swear this worked... But now I am also failing to make it work. No idea what happened. I guess the module library is meant more for modules than for report templates At this point I would suggest that you write to the support so they can look into it.
Regrads,
McTurtle
I could swear this worked... But now I am also failing to make it work. No idea what happened. I guess the module library is meant more for modules than for report templates At this point I would suggest that you write to the support so they can look into it.
Regrads,
McTurtle
Re: Reusing Custom Reports from module library
Hi,
Take backup of your custom report folder.
Delete the existing custom report folder.
Set restore to default under properties for report.
Build the solution and make sure no report error comes.
Go to property and create custom report.
Copy all back up files to new custom report folder.
Rename if required.
Pass same name under property for report by following .\FolderName
Try to follow from attached image.
Take backup of your custom report folder.
Delete the existing custom report folder.
Set restore to default under properties for report.
Build the solution and make sure no report error comes.
Go to property and create custom report.
Copy all back up files to new custom report folder.
Rename if required.
Pass same name under property for report by following .\FolderName
Try to follow from attached image.
You do not have the required permissions to view the files attached to this post.