Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Merging clover db from different machines

Padmanabh Sahasrabudhe February 2, 2015

I have a case where I need to run the automation tests on parallel machines. Is there anyway by which I can merge the 4 cloverMerge.db from different machines and create a report out of that merged db?

2 answers

1 vote
Grzegorz Lewandowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2015

Hello Padmanabh,

I'm not sure if I understand correctly what you're asking about, so as far it goes about managing your clover.db files on different machines and modules there's couple of things coming to my mind: 

On the other hand if you're asking how to get distributed per test coverage from all machines I think here's an tutorial for you (keep in mind this will work only with supported testing frameworks):

https://confluence.atlassian.com/display/CLOVER/Using+Distributed+Per-test+Coverage

Don't hesitate to ask if you have any questions. 

Cheers,

Grzegorz

 

Padmanabh Sahasrabudhe May 14, 2015

Grzegorz, thanks for you answer. I didn't get exactly what you meant by "you can find clover.db files for all of your modules via find command, compress it (i.e via tar.gz ) and then sync only one file between 3 machines"? My scenario is machine1, machine2 and machine3 have three different instances of source code. I have to do it this way because I run regression runs in chunks of tests on each independent machine. So is there an easy way to have 1 clover report rather than 3 reports for three independent instances. Hope I made it little clearer..

Grzegorz Lewandowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2015

As far as I get it right now you're getting 3 different Clover reports on 3 different machines, which none of them indicating full code coverage. Because all of them are generated from the same source code you should copy all code coverage files from every machine (clover.db*) to a dir which contains clover.db file and generate report from within it.

You don't really need to merge anything. Please refer to Marek's comment and link provided by him.

 

Regards,

Grzegorz

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 2, 2015

Yes. It's possible to collect coverage data from several machines. In order to merge Clover databases you can use <clover-merge> Ant task, clover2:merge Maven goal or the CloverMerge command line tool.

 

The question is whether you actually need to perform a database merge. I assume that you have only one application and you just split tests into several sets and run them in parallel on separate machines - each machine is running the same application. Am I correct? If yes, then it should sufficient to copy coverage data files (clover.db*) from all machines into one directory and run report generation.

 

Please have a look at this manual: https://confluence.atlassian.com/display/CLOVER/Using+Clover+in+various+environment+configurations

 

Feel free to ask if you have any questions.

Padmanabh Sahasrabudhe May 14, 2015

Marek, thanks, I didn't try your suggestion, but I don't think it worked. Here is my scenario based on your link.

  1. I have same application deployed on different machines.
  2. Different tests from UI run on it on three different machines and so I have clover.db for same modules on 3 different machines.
    e.g.
  • MachineA : C:\sourcetree\moduleA\clover.db clover.db* and clover.liverec file.
  • MachineB : C:\sourcetree\moduleA\clover.db clover.db* and clover.liverec file.
  • MachineC : C:\sourcetree\moduleA\clover.db clover.db* and clover.liverec file.

And I have about 25 such modules on these three machines. Is there some easy way for this?

Thanks,

Padmanabh

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events