1

I can not see report tab here:

no tab

Public Junit test report:

Public Junit test report

I have configured Public JUnit test report, but I still can not see test report in left area.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
joan.li
  • 31
  • 5

1 Answers1

0

As the OP joan.li adds in the comments, you need to make sure Your Jenkins installation knows about maven (as mentioned in "Jenkins executing maven from incorrect path"):

  1. Add the default maven installation under (Jenkins -> configuration)
    Jenkins -> configuration -> Maven

  2. Goto the failing job and make sure you choose the default maven installation from dropdown
    Config in failing Job

And You need to make sure your pom.xml does include a surefire build step

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>
            <configuration>
                <suiteXmlFiles>
                    <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                </suiteXmlFiles>
            </configuration>
        </plugin>

See also this example.

Check if those xml files are generated

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • org.codehaus.mojo cobertura-maven-plugin 2.4 xml html – joan.li Jun 29 '17 at 09:22
  • @joan.li Don't hesitate to edit your question to add new information. – VonC Jun 29 '17 at 09:25
  • there are some xml files in surefire-reports folder. – joan.li Jun 29 '17 at 09:25
  • @joan.li you still need to check that your build step in your maven build does include a surefire step, as configured in my answer. – VonC Jun 29 '17 at 09:26
  • So that would be what is missing in your case. Check the first link in my answer for a complete pom.xml example. – VonC Jun 29 '17 at 09:53
  • I have solved the problem,Just Scroll down about half way to the Maven section and click Maven installations. Give your path to your Maven install in MAVEN_HOME. – joan.li Jun 30 '17 at 02:34
  • @joan.li Right! I have added the relevant step and illustrations to the answer for more visibility. – VonC Jun 30 '17 at 04:23