|
I have the Integration Test widget on my dashboard, and now with the combined coverage between both unit test and integration tests (as long as JaCoCo is used for both), the widget has a property showing up instead of a label
See the following screenshot: ![]() Ignore the values for each are the same instead of being separated out. That could possibly be a misconfiguration on my side I'm working through. I'm just bringing up the "widget.overall-coverage.name" part. If I still have issues with combined coverage beyond just this label, I'll let you know.
-- Larry
|
|
Thank you Larry,
Here's the ticket: http://jira.codehaus.org/browse/SONAR-3912 It should be fixed in sonar 3.3.1 -- -- David On 25 October 2012 21:43, Larry Shatzer, Jr. <[hidden email]> wrote: I have the Integration Test widget on my dashboard, and now with the combined coverage between both unit test and integration tests (as long as JaCoCo is used for both), the widget has a property showing up instead of a label |
|
I’m really struggling with the combined coverage in 3.3. The two widgets are showing the same results, I would expect that coverage would be different for the unit tests and the integration test, and then there would
be an overall coverage that combined the two. I would also expect a separate integration results widget, so that I could quickly drill down to problems in the integration tests. So in V3.3 if UT and IT are really combined values, I am always going to have a discrepancy between what developers see doing UT, and what we show on the server
when running both UT and IT. Or do I really have to run two separate jobs in Jenkins (using Sonar), one for normal CI only running UT, and another for a deployment test where both UT and IT are run? Even though the documentation has been updated for V3.3 regarding the combined coverage with jacoco, it still lacks enough information to configure it correctly.
I have looked at the source in github that was recently updated, but it was still difficult to determine how to properly configure maven so that surefire and failsafe were configured correctly to work with jacoco and Sonar. Am I missing something here? Larry Smith From: David Gageot [mailto:[hidden email]]
Thank you Larry, Here's the ticket: http://jira.codehaus.org/browse/SONAR-3912 It should be fixed in sonar 3.3.1 -- On 25 October 2012 21:43, Larry Shatzer, Jr. <[hidden email]> wrote: I have the Integration Test widget on my dashboard, and now with the combined coverage between both unit test and integration tests (as long as JaCoCo is used for both), the widget has a property showing up instead of a label See the following screenshot:
Ignore the values for each are the same instead of being separated out. That could possibly be a misconfiguration on my side I'm working through. I'm just bringing up the "widget.overall-coverage.name"
part. If I still have issues with combined coverage beyond just this label, I'll let you know. -- Larry |
|
I got my combined coverage separated since I was long ago using just cobertura for code coverage, and using jacoco for integration test coverage. I used jacoco.exec as the name of the integration test coverage file. I then had to rename the one integration tests produced to itjacoco.exec, and then it separated them.
See: ![]() On Fri, Oct 26, 2012 at 9:54 AM, Smith, Larry (ECS - Enterprise Cloud Service) <[hidden email]> wrote:
|
|
Larry, Can you post your pom? Larry Smith From: Larry Shatzer, Jr. [mailto:[hidden email]]
I got my combined coverage separated since I was long ago using just cobertura for code coverage, and using jacoco for integration test coverage. I used jacoco.exec as the name of the integration test coverage file. I then had to rename
the one integration tests produced to itjacoco.exec, and then it separated them.
On Fri, Oct 26, 2012 at 9:54 AM, Smith, Larry (ECS - Enterprise Cloud Service) <[hidden email]> wrote: I’m really struggling with the combined coverage in 3.3. The two widgets are showing the same results, I would expect that coverage would be different for
the unit tests and the integration test, and then there would be an overall coverage that combined the two. I would also expect a separate integration results widget, so that I could quickly drill down to
problems in the integration tests. So in V3.3 if UT and IT are really combined values, I am always going to have a discrepancy between
what developers see doing UT, and what we show on the server when running both UT and IT. Or do I really have to run two separate jobs in Jenkins (using Sonar), one for normal CI only running UT, and another for a deployment test where both UT and IT are run? Even though the documentation has been updated for V3.3 regarding the combined coverage with jacoco,
it still lacks enough information to configure it correctly. I have looked at the source in github that was recently updated, but it was still difficult to determine how to properly configure maven so that surefire and failsafe were configured correctly to
work with jacoco and Sonar. Am I missing something here?
Larry Smith From: David Gageot [mailto:[hidden email]]
Thank you Larry, Here's the ticket: http://jira.codehaus.org/browse/SONAR-3912 It should be fixed in sonar 3.3.1 -- On 25 October 2012 21:43, Larry Shatzer, Jr. <[hidden email]> wrote: I have the Integration Test widget on my dashboard, and now with the combined coverage between both unit test and integration tests (as long as JaCoCo is used for both), the widget
has a property showing up instead of a label See the following screenshot:
Ignore the values for each are the same instead of being separated out. That could possibly be a misconfiguration on my side I'm working through. I'm just bringing up the "widget.overall-coverage.name"
part. If I still have issues with combined coverage beyond just this label, I'll let you know. -- Larry |
|
In reply to this post by Larry Shatzer, Jr.
I am having a problem getting the itjacoco.exe file to be created. Larry Smith From: Larry Shatzer, Jr. [mailto:[hidden email]]
I got my combined coverage separated since I was long ago using just cobertura for code coverage, and using jacoco for integration test coverage. I used jacoco.exec as the name of the integration test coverage file. I then had to rename
the one integration tests produced to itjacoco.exec, and then it separated them.
On Fri, Oct 26, 2012 at 9:54 AM, Smith, Larry (ECS - Enterprise Cloud Service) <[hidden email]> wrote: I’m really struggling with the combined coverage in 3.3. The two widgets are showing the same results, I would expect that coverage would be different for
the unit tests and the integration test, and then there would be an overall coverage that combined the two. I would also expect a separate integration results widget, so that I could quickly drill down to
problems in the integration tests. So in V3.3 if UT and IT are really combined values, I am always going to have a discrepancy between
what developers see doing UT, and what we show on the server when running both UT and IT. Or do I really have to run two separate jobs in Jenkins (using Sonar), one for normal CI only running UT, and another for a deployment test where both UT and IT are run? Even though the documentation has been updated for V3.3 regarding the combined coverage with jacoco,
it still lacks enough information to configure it correctly. I have looked at the source in github that was recently updated, but it was still difficult to determine how to properly configure maven so that surefire and failsafe were configured correctly to
work with jacoco and Sonar. Am I missing something here?
Larry Smith From: David Gageot [mailto:[hidden email]]
Thank you Larry, Here's the ticket: http://jira.codehaus.org/browse/SONAR-3912 It should be fixed in sonar 3.3.1 -- On 25 October 2012 21:43, Larry Shatzer, Jr. <[hidden email]> wrote: I have the Integration Test widget on my dashboard, and now with the combined coverage between both unit test and integration tests (as long as JaCoCo is used for both), the widget
has a property showing up instead of a label See the following screenshot:
Ignore the values for each are the same instead of being separated out. That could possibly be a misconfiguration on my side I'm working through. I'm just bringing up the "widget.overall-coverage.name"
part. If I still have issues with combined coverage beyond just this label, I'll let you know. -- Larry |
|
In reply to this post by Smith, Larry (ECS - Enterprise Cloud Service)
<profile> <id>sonar</id>
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId>
<configuration> <argLine>-javaagent:${jacoco.agent.path}=destfile=${jacoco.file.path}</argLine> </configuration> </plugin>
</plugins> </build> </profile> Then I have a profile for my integration tests that kick off failsafe, and to only run the integration tests (they are in the same project, just named with IT at the start or end)
<profile> <id>it</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <configuration> <excludes> <exclude>**/Test*.java</exclude>
<exclude>**/*Test.java</exclude> <exclude>**/*TestCase.java</exclude> </excludes> </configuration>
</plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId>
<configuration> <excludes> <exclude>**/Test*.java</exclude> <exclude>**/*Test.java</exclude>
<exclude>**/*TestCase.java</exclude> </excludes> <includes> <include>**/IT*.java</include>
<include>**/*IT.java</include> <include>**/*ITCase.java</include> </includes> </configuration>
<executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal>
</goals> </execution> </executions> </plugin> </plugins> </build>
</profile> On Fri, Oct 26, 2012 at 10:29 AM, Smith, Larry (ECS - Enterprise Cloud Service) <[hidden email]> wrote:
|
|
What are you using for the agent path? The path to the agent file in your local m2 repo?
On Fri, Oct 26, 2012 at 12:52 PM, Larry Shatzer, Jr. <[hidden email]> wrote:
|
|
I have it point to a local path on the server where I've extracted the jacoco zip file. Not 100% ideal, but works once setup.
On Fri, Oct 26, 2012 at 1:43 PM, Maven User <[hidden email]> wrote: What are you using for the agent path? The path to the agent file in your local m2 repo? |
|
Which kinds of tests are you running?
I can see both the unit and integration .exec files get generated, but I feel like nothing as been recorded. We're using cucumber so I'm wondering if there is something NOT properly recording... On Fri, Oct 26, 2012 at 5:03 PM, Larry Shatzer, Jr. <[hidden email]> wrote: I have it point to a local path on the server where I've extracted the jacoco zip file. Not 100% ideal, but works once setup. |
|
Make sure you configure Sonar is configured for the integration test exec file in the project config. On Oct 26, 2012 3:27 PM, "Maven User" <[hidden email]> wrote:
Which kinds of tests are you running? |
| Powered by Nabble | Edit this page |
