code coverage and unit test report not showing up in dashboard

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

code coverage and unit test report not showing up in dashboard

softwareforums2013
I have a simple project with 2 class and 2 test class.
 
src
src1
 
test
test1
 
below is my pom.xml file contain
<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>sample5</groupId>
  <artifactId>sample5</artifactId>
  <name>sample5</name>
  <version>1.4.0</version>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.0</version>
      <type>jar</type>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
  <build>
<sourceDirectory>C:/samplecode/samples/sample5/src1</sourceDirectory>
    <sourceDirectory>C:/samplecode/samples/sample5/src1</sourceDirectory>
 <outputDirectory>C:/samplecode/samples/sample5/classes1</outputDirectory>
 <testSourceDirectory>C:/samplecode/samples/sample5/test1</testSourceDirectory>
 <testOutputDirectory>C:/samplecode/samples/sample5/test-classes1</testOutputDirectory>
 <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
  <version>2.5</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <excludes>
            <exclude>**/*.*</exclude>
          </excludes>
        </configuration>
      </plugin>
   <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
       <source>C:/samplecode/samples/sample5/src</source>
     <source>C:/samplecode/samples/sample5/src1</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
<properties>
 <sonar.dynamicAnalysis>true</sonar.dynamicAnalysis>
 <sonar.phase>generate-sources</sonar.phase>
  </properties>
</project>
Reply | Threaded
Open this post in threaded view
|

Re: code coverage and unit test report not showing up in dashboard

softwareforums2013
here is my pom.xml file the one that i have mentioned above is incorrect.
 
<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>sample5</groupId>
  <artifactId>sample5</artifactId>
  <name>sample5</name>
  <version>1.4.0</version>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.0</version>
      <type>jar</type>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
  <build>
    <sourceDirectory>C:/samplecode/samples/sample5/src</sourceDirectory>
 <sourceDirectory>C:/samplecode/samples/sample5/src1</sourceDirectory>
 <outputDirectory>C:/samplecode/samples/sample5/classes</outputDirectory>
 <outputDirectory>C:/samplecode/samples/sample5/classes1</outputDirectory>
 <testSourceDirectory>C:/samplecode/samples/sample5/test</testSourceDirectory>
 <testSourceDirectory>C:/samplecode/samples/sample5/test1</testSourceDirectory>
 <testOutputDirectory>C:/samplecode/samples/sample5/test-classes</testOutputDirectory>
 <testOutputDirectory>C:/samplecode/samples/sample5/test-classes1</testOutputDirectory>
 <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
  <version>2.5</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <excludes>
            <exclude>**/*.*</exclude>
          </excludes>
        </configuration>
      </plugin>
   <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
       <source>C:/samplecode/samples/sample5/src</source>
     <source>C:/samplecode/samples/sample5/src1</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
<properties>
 <sonar.dynamicAnalysis>true</sonar.dynamicAnalysis>
 <sonar.phase>generate-sources</sonar.phase>
  </properties>
</project>


On Mon, Oct 21, 2013 at 1:47 PM, aaron blood <[hidden email]> wrote:
I have a simple project with 2 class and 2 test class.
 
src
src1
 
test
test1
 
below is my pom.xml file contain
<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>sample5</groupId>
  <artifactId>sample5</artifactId>
  <name>sample5</name>
  <version>1.4.0</version>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.0</version>
      <type>jar</type>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
  <build>
<sourceDirectory>C:/samplecode/samples/sample5/src1</sourceDirectory>
    <sourceDirectory>C:/samplecode/samples/sample5/src1</sourceDirectory>
 <outputDirectory>C:/samplecode/samples/sample5/classes1</outputDirectory>
 <testSourceDirectory>C:/samplecode/samples/sample5/test1</testSourceDirectory>
 <testOutputDirectory>C:/samplecode/samples/sample5/test-classes1</testOutputDirectory>
 <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
  <version>2.5</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <excludes>
            <exclude>**/*.*</exclude>
          </excludes>
        </configuration>
      </plugin>
   <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
       <source>C:/samplecode/samples/sample5/src</source>
     <source>C:/samplecode/samples/sample5/src1</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
<properties>
 <sonar.dynamicAnalysis>true</sonar.dynamicAnalysis>
 <sonar.phase>generate-sources</sonar.phase>
  </properties>
</project>