Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BF4D8200C21 for ; Mon, 20 Feb 2017 09:06:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BDEB3160B73; Mon, 20 Feb 2017 08:06:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E1A3D160B62 for ; Mon, 20 Feb 2017 09:06:04 +0100 (CET) Received: (qmail 72911 invoked by uid 500); 20 Feb 2017 08:06:04 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 72902 invoked by uid 99); 20 Feb 2017 08:06:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2017 08:06:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 9BC09C047D for ; Mon, 20 Feb 2017 08:06:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 4UMImDRS_HfX for ; Mon, 20 Feb 2017 08:06:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A02725F5F7 for ; Mon, 20 Feb 2017 08:06:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 87C52E073C for ; Mon, 20 Feb 2017 08:05:44 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 343CB2411F for ; Mon, 20 Feb 2017 08:05:44 +0000 (UTC) Date: Mon, 20 Feb 2017 08:05:44 +0000 (UTC) From: "Stas Levin (JIRA)" To: commits@beam.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (BEAM-1399) Code coverage numbers are not accurate MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 20 Feb 2017 08:06:05 -0000 [ https://issues.apache.org/jira/browse/BEAM-1399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15873590#comment-15873590 ] Stas Levin edited comment on BEAM-1399 at 2/20/17 8:04 AM: ----------------------------------------------------------- Thanks for the tip [~dhalperi@google.com], I wasn't aware the {{beam-sdks-java-javadoc}} module depended on all the other ones. From preliminary experiments, looks like {{report-aggregate}} aggregates reports across dependent modules, so that the resulting report is as if you had executed the regular {{report}} and merged them all together (visually). In terms of coverage, I'm still seeing the 69% for {{beam-sdks-java-core}} both when using {{report}} specifically for {{beam-sdks-java-core}} and {{report-aggregate}} for the {{beam-sdks-java-javadoc}} module. This may indicate that {{report-aggregate}} does not capture the additional {{@RunnableOnService/@NeedsRunner}} tests we are after, at least not out-of-the box. In addition, test class coverage is not reported (neither by {{report}} nor by {{report-aggregate}}), only production code ^2^. Essentially we have the following major issues: # Record coverage across modules #* Might be possible using {{maven-antrun-plugin}} and/or copying {{.class}} / {{.java}} files of dependent modules to {{beam-sdks-java-javadoc}}, as described in ^1^. # Report test class coverage #* Might be possible using {{maven-antrun-plugin}} since it gives fine-grained control over what's reported. # Merge coverage provided by different executions of the same test class #* As I dive deeper into this, I'm inclined to think that the {{jacoco-maven-plugin}} does not support merging coverage for a class executed from different modules due to ^3^, which brings me back to separating {{@RunnableOnService/@NeedsRunner}} into their own test classes and the rest of the goodies behind curtain number (2) detailed in my first comment above. 1. https://groups.google.com/forum/#!searchin/jacoco/integration$20tests|sort:relevance/jacoco/_yuHGr_Kp6s/irM031B6KNAJ 2. http://stackoverflow.com/questions/34483904/jacoco-maven-plugin-include-test-sources 3. http://www.eclemma.org/jacoco/trunk/doc/classids.html was (Author: staslev): Thanks for the tip [~dhalperi@google.com], I wasn't aware the {{beam-sdks-java-javadoc}} module depended on all the other ones. From preliminary experiments, looks like {{report-aggregate}} aggregates reports across dependent modules, so that the resulting report is as if you had executed the regular {{report}} and merged them all together (visually). In terms of coverage, I'm still seeing the 69% for {{beam-sdks-java-core}} both when using {{report}} specifically for {{beam-sdks-java-core}} and {{report-aggregate}} for the {{beam-sdks-java-javadoc}} module. This may indicate that {{report-aggregate}} does not capture the additional {{@RunnableOnService/@NeedsRunner}} tests we are after, at least not out-of-the box. In addition, test class coverage is not reported (neither by {{report}} nor by {{report-aggregate}}), only production code ^2^. Essentially we have the following major issues: # Record coverage across modules #* Might be possible using {{maven-antrun-plugin}} and/or copying {{.class}} / {{.java}} files of dependent modules to {{beam-sdks-java-javadoc}}, as described in ^1^. # Report test class coverage #* Might be possible using {{maven-antrun-plugin}} since it gives fine-grained control over what's reported. # Merge coverage provided by different executions of the same test class #* As I dive deeper into this, I'm inclined to think that the {{jacoco-maven-plugin}} does not support merging coverage for a test class executed from different modules due to ^3^, which brings me back to separating {{@RunnableOnService/@NeedsRunner}} into their own test classes and the rest of the goodies behind curtain number (2) detailed in my first comment above. 1. https://groups.google.com/forum/#!searchin/jacoco/integration$20tests|sort:relevance/jacoco/_yuHGr_Kp6s/irM031B6KNAJ 2. http://stackoverflow.com/questions/34483904/jacoco-maven-plugin-include-test-sources 3. http://www.eclemma.org/jacoco/trunk/doc/classids.html > Code coverage numbers are not accurate > -------------------------------------- > > Key: BEAM-1399 > URL: https://issues.apache.org/jira/browse/BEAM-1399 > Project: Beam > Issue Type: Bug > Components: build-system, sdk-java-core, testing > Reporter: Daniel Halperin > Labels: newbie, starter > > We've started adding Java Code Coverage numbers to PRs using the jacoco plugin. However, we are getting very low coverage reported for things like the Java SDK core. > My belief is that this is happening because we test the bulk of the SDK not in the SDK module , but in fact in the DirectRunner and other similar modules. > JaCoCo has a {{report:aggregate}} target that might do the trick, but with a few minutes of playing with it I wasn't able to make it work satisfactorily. Basic work in https://github.com/apache/beam/pull/1800 > This is a good "random improvement" issue for anyone to pick up. -- This message was sent by Atlassian JIRA (v6.3.15#6346)