Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cobertura does not include into coverage report classes which have interface import from java.util.stream #29

Open
MEZk opened this issue Feb 21, 2017 · 1 comment

Comments

@MEZk
Copy link

MEZk commented Feb 21, 2017

Based on #21 (comment) and #18

Main.java

import java.util.stream.Stream;
public class Main {
    public static void main(String[] args) {
        Stream.of("a", "b");
    }
}

MainTest.java

import org.junit.Test;

public class MainTest {
    @Test
    public void testMain() {
    }
}

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>test</groupId>
    <artifactId>test</artifactId>
    <version>1.0-SNAPSHOT</version>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
    </dependency>
</dependencies>

        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
            </plugins>
        </build>
</project>

CMD: mvn clean cobertura:cobertura
Expected result: class Main is included into coverage report (0% coverage)
Actual result: class Main is not included into coverage report (report is empty)

@MEZk MEZk changed the title Cobertura does not include classes which have import from java.util.stream into coverage report Cobertura does not include into coverage report classes which have interface import from java.util.stream Feb 22, 2017
@jaypatel512
Copy link

Seeing the same issue here. Preventing us from successfully migrating to newer version of Java language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants