Generate JUnit report via code

Class library usage, coding and language questions.
wellingtonsantana
Certified Professional
Certified Professional
Posts: 18
Joined: Sat Jan 23, 2016 12:50 am
Contact:

Generate JUnit report via code

Post by wellingtonsantana » Thu Nov 08, 2018 6:51 pm

Hello,
I'm taking a little time looking for a solution to generate Junit report file (as Propertiers -> Report) via code.
There are nothing in my searches on classes TestReport, Report, ReportEnvir, ReportEnvironment, etc.
Anyone has a clue for this? :roll:

Thanks,

User avatar
qwertzu
Posts: 284
Joined: Wed Jan 25, 2017 11:08 am

Re: Generate JUnit report via code

Post by qwertzu » Fri Nov 09, 2018 2:47 pm

hey,
why exactly would you like to create it via code?
The JUnit report function generally creates a compatible copy of the Ranorex report which is always created after the test finished.
So it won't be possible to create it during runtime, before the creation of the normal report.
regards, qwertzu

wellingtonsantana
Certified Professional
Certified Professional
Posts: 18
Joined: Sat Jan 23, 2016 12:50 am
Contact:

Re: Generate JUnit report via code

Post by wellingtonsantana » Fri Nov 09, 2018 3:05 pm

That is need, call this function inside of my code.
I'm just using Ranorex library's to execute test, but creating scripts by my own (not via Ranorex IDE).
Do you know where is function?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Generate JUnit report via code

Post by odklizec » Mon Nov 12, 2018 9:52 am

Hi,

Examining Ranorex API, does not reveal there is a function for this. So there is either no API or its not public?...
https://www.ranorex.com/Documentation/Ranorex/
I think your best hope is to use command line parameter /ju (check user guide for more details)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration