0
votes

Jenkins Version : 2.176.2

Executing Selenium tests via Jenkins : Ecplsie+mvn+Jenkins

Selenium Workspace Folder : C:\Users\admin\eclipse-workspace\ACA

The actual location of the testng-results.xml: C:\Users\admin\eclipse-workspace\ACA\target\surefire-reports\testng-results.xml

Jenkins Insatlled / Home Directory: C:\Program Files (x86)\Jenkins

Building in workspace C:\Program Files (x86)\Jenkins\workspace\ACATestAutomationJob

Executing Maven: -B -f C:\Users\admin\eclipse-workspace\ACA\pom.xml clean install

TestNG Reports Processing: START

Looking for TestNG results report in workspace using pattern: **/target/surefire-reports/testng-results.xml

Did not find any matching files.

How do i make jenkins locate this testng-results.xml?

enter image description here

enter image description here

enter image description here

Thanks, Raj

1

1 Answers

0
votes
  1. Look into Jenkins Console Output, it should report where the build is running (so called WORKSPACE) and where TestNG Results Plugin attempts to locate the results file:

    enter image description here

  2. The path to the TestNG results file must be relative to the WORKSPACE and have the syntax of Ant FileSet

If you're uncertain regarding how to properly build the path to the test artifacts - post the full paths to WORKSPACE and the testng-results.xml / emailable-report.html and we will help you to come up with the correct definitions.

In the meantime you could use wildcard paths like:

**/testng-results.xml

so Jenkins will scan its WORKSPACE recursively looking for the testng-results.xml file in all available locations

Your install command also looks suspicious, normally you should not be putting your test artifacts to the Maven repository so you might want to use mvn test or mvn verify instead.

More information: