Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » How to setup Junit and Jacoco for remote AUT?(How to setup Junit and Jacoco for remote AUT?)
How to setup Junit and Jacoco for remote AUT? [message #1810440] Mon, 12 August 2019 05:54 Go to next message
Thomas Lehmann is currently offline Thomas LehmannFriend
Messages: 6
Registered: August 2019
Junior Member
Hi,

I found some links related to Jubula and Jacoco but they didn't help me to understand how to set it up for Jubula Tests running via Junit with an AUT running on a remote machine. We are using the AUTConfiguration to start the remote AUT.

Could you please give an example, a link to documentation or a link to an example project matching the title/description?

Kind Regards,
Thomas
Re: How to setup Junit and Jacoco for remote AUT? [message #1810533 is a reply to message #1810440] Tue, 13 August 2019 09:41 Go to previous messageGo to next message
Marcel Hein is currently offline Marcel HeinFriend
Messages: 17
Registered: February 2014
Junior Member
Hello Thomas,

to use Jacoco in your AUT it needs to be included in the AUT-Configuration as part of the AUT-Arguments, e.g.: -javaagent:[yourpath/]jacocoagent.jar=[option1]=[value1],[option2]=[value2]
Source: https://www.devopsschool.com/tutorial/jacoco/setup-and-run-jacoco-in-5-mins.html
in the section "How do you attach the agent to the JVM?"

Setting it up like this should create Report files on the machine the AUT is running on.

If this was not helpful enough feel free to ask more questions.

Kind Regards,
Marcel
Re: How to setup Junit and Jacoco for remote AUT? [message #1810754 is a reply to message #1810533] Mon, 19 August 2019 09:30 Go to previous messageGo to next message
Thomas Lehmann is currently offline Thomas LehmannFriend
Messages: 6
Registered: August 2019
Junior Member
Hello Marcel,

it's clear to me what you mean with passing as argument but the question is how (on Windows)?
What I have been trying (test):
final var arguments = new String[]{"-javaagent:c:\\tools\\jacoco\\lib\\jacocoagent.jar=destfile=jacoco-jubula.exec,includes=rcp.demo.*"};

Without the agent trying the same would look like following:
rcp.demo.product\target\products\rcp.demo.plugin.application.test.id\win32\win32\x86_64\eclipse.exe -javaagent:c:\tools\jacoco\lib\jacocoagent.jar=destfile=jacoco-jubula,includes=rcp.demo.*

Not sure whether this is supposed to work. Of course if you start a jar using the Java executable it probably should do that trick.
Neither log output nor file is generated for now.

Kind Regards,
Thomas
Re: How to setup Junit and Jacoco for remote AUT? [message #1810809 is a reply to message #1810754] Tue, 20 August 2019 06:27 Go to previous message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 255
Registered: March 2012
Senior Member
Hello Thomas,
for eclipse applications there are two approaches to start a java agent with it. One it to add the jacoco javaagent in the config.ini. The other way is to use the _JAVA_OPTIONS environmental property (be careful with this. It should only be set for the start of the application and not globally since this will affect all java applications).

best regards
Marvin Mueller
Previous Topic:How to set object recognition profile by jubula's java swing api?
Next Topic:Jubula throws Component not found exception before launching AUT
Goto Forum:
  


Current Time: Sun Oct 13 01:25:36 GMT 2024

Powered by FUDForum. Page generated in 0.24944 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top