[Pharo-project] Is HudsonBuildTools test coverage report ready?
Hi Lukas. I was playing with the test coverage, I installed the emma plugin for Jenkis and I configure everything. However, I don't get any result but instead a: Emma: looking for coverage reports in the provided path: **/*-Coverage.xml Emma: no coverage files found in workspace. Was any report generated? Build step 'Record Emma coverage report' changed build result to FAILURE Finished: FAILURE I guess that from my xxx.tests.st I should call HDCoverageReport but I don't know how and it doesn't have class comments. What should I call from my .st ? I thought I could do something like HDCoverageReport runPackages: aListofPackages but I don't think that can work, because you need TWO parameters: the tests packages and the "real" packages. Any idea? Thanks -- Mariano http://marianopeck.wordpress.com
On 31 October 2011 11:02, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
Hi Lukas. I was playing with the test coverage, I installed the emma plugin for Jenkis and I configure everything. However, I don't get any result but instead a:
Emma: looking for coverage reports in the provided path: **/*-Coverage.xml Emma: no coverage files found in workspace. Was any report generated? Build step 'Record Emma coverage report' changed build result to FAILURE Finished: FAILURE
I guess that from my xxx.tests.st I should call HDCoverageReport but I don't know how and it doesn't have class comments. What should I call from my .st ? I thought I could do something like HDCoverageReport runPackages: aListofPackages  but I don't think that can work, because you need TWO parameters: the tests packages and the "real" packages.
Any idea?
You run HDCoverageReport exactly the same way as HDTestReport. HDCoverageReport uses exactly the same mechanism as the Test Runner to figure out the code you want calculate the coverage on. That is, you have to override #packageNamesUnderTest on the class side of one of your test classes. I don't know if HDCoverageReport still works, because I stopped using it when I started with Cog on Jenkins. It definitely works on traditional VMs. Probably today it works on Cog too. Lukas -- Lukas Renggli www.lukas-renggli.ch
You run HDCoverageReport exactly the same way as HDTestReport.
HDCoverageReport uses exactly the same mechanism as the Test Runner to figure out the code you want calculate the coverage on. That is, you have to override #packageNamesUnderTest on the class side of one of your test classes.
Wow....I wasn't aware of that. I always trigger the TestCoverage from the test runner and then I needed to select the package to which it should calculate the coverage...
I don't know if HDCoverageReport still works, because I stopped using it when I started with Cog on Jenkins. It definitely works on traditional VMs. Probably today it works on Cog too.
Yes, latest Cog works ok with test coverage, and HDCoverageReport works!! look the attached screenshot Thanks Lukas
Lukas
-- Lukas Renggli www.lukas-renggli.ch
-- Mariano http://marianopeck.wordpress.com
Cool, so what is your experience? Does it work well with the latest Cog? I should re-enable the coverage on my images again :-) Lukas On 31 October 2011 12:22, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
You run HDCoverageReport exactly the same way as HDTestReport.
HDCoverageReport uses exactly the same mechanism as the Test Runner to figure out the code you want calculate the coverage on. That is, you have to override #packageNamesUnderTest on the class side of one of your test classes.
Wow....I wasn't aware of that. I always trigger the TestCoverage from the test runner and then I needed to select the package to which it should calculate the coverage...
I don't know if HDCoverageReport still works, because I stopped using it when I started with Cog on Jenkins. It definitely works on traditional VMs. Probably today it works on Cog too.
Yes, latest Cog works ok with test coverage, and HDCoverageReport works!! look the attached screenshot
Thanks Lukas
Lukas
-- Lukas Renggli www.lukas-renggli.ch
-- Mariano http://marianopeck.wordpress.com
-- Lukas Renggli www.lukas-renggli.ch
On Mon, Oct 31, 2011 at 12:27 PM, Lukas Renggli <renggli@gmail.com> wrote:
Cool, so what is your experience? Does it work well with the latest Cog?
Yes, as far as I can see yes. But it would be cool another guy test it also because there is no exact way to be sure whether it is working good or not. I just check the non-covered methods and I analyzed if they are correct not to be covered or not....
I should re-enable the coverage on my images again :-)
Sure, but first give it a try with a normal image with latest cog. If it works then update your jenkis :)
Lukas
On 31 October 2011 12:22, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
You run HDCoverageReport exactly the same way as HDTestReport.
HDCoverageReport uses exactly the same mechanism as the Test Runner to figure out the code you want calculate the coverage on. That is, you have to override #packageNamesUnderTest on the class side of one of your test classes.
Wow....I wasn't aware of that. I always trigger the TestCoverage from the test runner and then I needed to select the package to which it should calculate the coverage...
I don't know if HDCoverageReport still works, because I stopped using it when I started with Cog on Jenkins. It definitely works on traditional VMs. Probably today it works on Cog too.
Yes, latest Cog works ok with test coverage, and HDCoverageReport works!! look the attached screenshot
Thanks Lukas
Lukas
-- Lukas Renggli www.lukas-renggli.ch
-- Mariano http://marianopeck.wordpress.com
-- Lukas Renggli www.lukas-renggli.ch
-- Mariano http://marianopeck.wordpress.com
Last time I tried with the test runner (that uses essentially the same infrastructure) it didn't quite work for me yet. I had some rare random crashes and sometimes coverage results were not entirely correct. It improved with every new version of Cog, so maybe all problems are resolved now? :-) Also we have to check if the method lookup cache are flushed the same way as with the test runner. Could be that the two runners are out of sync. Lukas On 31 October 2011 12:30, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
On Mon, Oct 31, 2011 at 12:27 PM, Lukas Renggli <renggli@gmail.com> wrote:
Cool, so what is your experience? Does it work well with the latest Cog?
Yes, as far as I can see yes. But it would be cool another guy test it also because there is no exact way to be sure whether it is working good or not. I just check the non-covered methods and I analyzed if they are correct not to be covered or not....
I should re-enable the coverage on my images again :-)
Sure, but first give it a try with a normal image with latest cog. If it works then update your jenkis :)
Lukas
On 31 October 2011 12:22, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
You run HDCoverageReport exactly the same way as HDTestReport.
HDCoverageReport uses exactly the same mechanism as the Test Runner to figure out the code you want calculate the coverage on. That is, you have to override #packageNamesUnderTest on the class side of one of your test classes.
Wow....I wasn't aware of that. I always trigger the TestCoverage from the test runner and then I needed to select the package to which it should calculate the coverage...
I don't know if HDCoverageReport still works, because I stopped using it when I started with Cog on Jenkins. It definitely works on traditional VMs. Probably today it works on Cog too.
Yes, latest Cog works ok with test coverage, and HDCoverageReport works!! look the attached screenshot
Thanks Lukas
Lukas
-- Lukas Renggli www.lukas-renggli.ch
-- Mariano http://marianopeck.wordpress.com
-- Lukas Renggli www.lukas-renggli.ch
-- Mariano http://marianopeck.wordpress.com
-- Lukas Renggli www.lukas-renggli.ch
participants (2)
-
Lukas Renggli -
Mariano Martinez Peck