Jenkins TestNG plugin does not fetch results from the test-results.xml file.

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

Jenkins TestNG plugin does not fetch results from the test-results.xml file.

akshay.maldhure
In my project workspace, the test-results.xml file exists inside the target\surefire-reports\testng-results.xml directory. But Jenkins fails to read the XML file and gives below error on console.

Jenkins build log:
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.

To ensure the file isn't too old, I had checked that the test-results.xml (and other files) belong to the latest test run.

Please help.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

akshay.maldhure
Tried with / as well as \ in my Jenkins build config.

Also, I trigger my tests in Jenkins in below way (execute shell):
#!/bin/bash

if [ "$1" = "" ]; then
    echo "Please provide a valid suite XML file name."
else
    mvn clean
    mvn compile
    mvn clean test -Dsurefire.suiteXmlFiles="$1"
fi

It is strange how my testng-results.xml exists, but does not get picked up by Jenkins.

On Tuesday, September 5, 2017 at 12:52:51 PM UTC+5:30, [hidden email] wrote:
In my project workspace, the test-results.xml file exists inside the target\surefire-reports\testng-results.xml directory. But Jenkins fails to read the XML file and gives below error on console.

Jenkins build log:
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.

To ensure the file isn't too old, I had checked that the test-results.xml (and other files) belong to the latest test run.

Please help.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

⇜Krishnan Mahadevan⇝

Akshay,

 

I have tried using the below two flavors on my local machine (It runs on OSX) and it works fine.

 

Can you please add more context, to your problem statement including the folder structure of your workspace, and your console logs?

 

  1. **/target/surefire-reports/testng-results.xml

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/2/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

  1. **/testng-results.xml

 

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/3/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of <[hidden email]>
Reply-To: <[hidden email]>
Date: Tuesday, September 5, 2017 at 1:57 PM
To: testng-users <[hidden email]>
Subject: [testng-users] Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

 

Tried with / as well as \ in my Jenkins build config.

 

Also, I trigger my tests in Jenkins in below way (execute shell):

#!/bin/bash
 
if [ "$1" = "" ]; then
    echo "Please provide a valid suite XML file name."
else
    mvn clean
    mvn compile
    mvn clean test -Dsurefire.suiteXmlFiles="$1"
fi

 

It is strange how my testng-results.xml exists, but does not get picked up by Jenkins.


On Tuesday, September 5, 2017 at 12:52:51 PM UTC+5:30, [hidden email] wrote:

In my project workspace, the test-results.xml file exists inside the target\surefire-reports\testng-results.xml directory. But Jenkins fails to read the XML file and gives below error on console.

 

Jenkins build log:

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.
 
To ensure the file isn't too old, I had checked that the test-results.xml (and other files) belong to the latest test run.
 
Please help.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

akshay.maldhure
Hi Krishnan,

Attaching console logs and project structure.


On Tuesday, September 5, 2017 at 2:07:56 PM UTC+5:30, Krishnan Mahadevan wrote:

Akshay,

 

I have tried using the below two flavors on my local machine (It runs on OSX) and it works fine.

 

Can you please add more context, to your problem statement including the folder structure of your workspace, and your console logs?

 

  1. **/target/surefire-reports/testng-results.xml

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/2/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

  1. **/testng-results.xml

 

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/3/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="QLBEmgyYAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...> on behalf of <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="QLBEmgyYAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">akshay....@...>
Reply-To: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="QLBEmgyYAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...>
Date: Tuesday, September 5, 2017 at 1:57 PM
To: testng-users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="QLBEmgyYAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...>
Subject: [testng-users] Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

 

Tried with / as well as \ in my Jenkins build config.

 

Also, I trigger my tests in Jenkins in below way (execute shell):

#!/bin/bash
 
if [ "$1" = "" ]; then
    echo "Please provide a valid suite XML file name."
else
    mvn clean
    mvn compile
    mvn clean test -Dsurefire.suiteXmlFiles="$1"
fi

 

It is strange how my testng-results.xml exists, but does not get picked up by Jenkins.


On Tuesday, September 5, 2017 at 12:52:51 PM UTC+5:30, [hidden email] wrote:

In my project workspace, the test-results.xml file exists inside the target\surefire-reports\testng-results.xml directory. But Jenkins fails to read the XML file and gives below error on console.

 

Jenkins build log:

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.
 
To ensure the file isn't too old, I had checked that the test-results.xml (and other files) belong to the latest test run.
 
Please help.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="QLBEmgyYAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="QLBEmgyYAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="https://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

project_structure.png (60K) Download Attachment
console.rtf (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

⇜Krishnan Mahadevan⇝

When I asked for folder structure of your workspace, I was talking about your Jenkins job workspace and not the one from your IDE.

 

Your console logs that you shared have this:

 

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 6.195s

[INFO] Finished at: Tue Sep 05 14:05:20 IST 2017

[INFO] Final Memory: 20M/319M

[INFO] ------------------------------------------------------------------------

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.

Finished: SUCCESS

 

 

You should be using ** (double asterisk) and not * (single asterisk)

 

So please change the pattern to **/target/surefire-reports/testng-results.xml or just use **/testing-results.xml

 

The ** (double aseterisk) indicates that the prefix for your path can be anything.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of <[hidden email]>
Reply-To: <[hidden email]>
Date: Tuesday, September 5, 2017 at 2:21 PM
To: testng-users <[hidden email]>
Subject: Re: [testng-users] Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

 

Hi Krishnan,

 

Attaching console logs and project structure.



On Tuesday, September 5, 2017 at 2:07:56 PM UTC+5:30, Krishnan Mahadevan wrote:

Akshay,

 

I have tried using the below two flavors on my local machine (It runs on OSX) and it works fine.

 

Can you please add more context, to your problem statement including the folder structure of your workspace, and your console logs?

 

  1. **/target/surefire-reports/testng-results.xml

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/2/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

  1. **/testng-results.xml

 

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/3/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank">testng...@...> on behalf of <<a href="javascript:" target="_blank">akshay....@...>
Reply-To: <<a href="javascript:" target="_blank">testng...@...>
Date: Tuesday, September 5, 2017 at 1:57 PM
To: testng-users <<a href="javascript:" target="_blank">testng...@...>
Subject: [testng-users] Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

 

Tried with / as well as \ in my Jenkins build config.

 

Also, I trigger my tests in Jenkins in below way (execute shell):

#!/bin/bash
 
if [ "$1" = "" ]; then
    echo "Please provide a valid suite XML file name."
else
    mvn clean
    mvn compile
    mvn clean test -Dsurefire.suiteXmlFiles="$1"
fi

 

It is strange how my testng-results.xml exists, but does not get picked up by Jenkins.


On Tuesday, September 5, 2017 at 12:52:51 PM UTC+5:30, [hidden email] wrote:

In my project workspace, the test-results.xml file exists inside the target\surefire-reports\testng-results.xml directory. But Jenkins fails to read the XML file and gives below error on console.

 

Jenkins build log:

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.
 
To ensure the file isn't too old, I had checked that the test-results.xml (and other files) belong to the latest test run.
 
Please help.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank">testng-users...@....
To post to this group, send email to <a href="javascript:" target="_blank">testng...@....
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

akshay.maldhure
My bad, I provided the wrong log snippet (the one with a single *). I've actually tried it out with a lot of things. :P

So even with double asterisks (**), it does not work form me.

BTW, when I update the path in my Jenkins job to something like $HOME/myWorkspace/myProject/target/surefire-reports/testng-results.xml (an absolute path), Jenkins picks up the report and generates results out of it.

So it seems like an issue with the workspace path. How do I see my Jenkins job workspace?

On Tuesday, September 5, 2017 at 2:33:26 PM UTC+5:30, Krishnan Mahadevan wrote:

When I asked for folder structure of your workspace, I was talking about your Jenkins job workspace and not the one from your IDE.

 

Your console logs that you shared have this:

 

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 6.195s

[INFO] Finished at: Tue Sep 05 14:05:20 IST 2017

[INFO] Final Memory: 20M/319M

[INFO] ------------------------------------------------------------------------

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.

Finished: SUCCESS

 

 

You should be using ** (double asterisk) and not * (single asterisk)

 

So please change the pattern to **/target/surefire-reports/testng-results.xml or just use **/testing-results.xml

 

The ** (double aseterisk) indicates that the prefix for your path can be anything.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="dAQpx3CZAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...> on behalf of <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="dAQpx3CZAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">akshay....@...>
Reply-To: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="dAQpx3CZAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...>
Date: Tuesday, September 5, 2017 at 2:21 PM
To: testng-users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="dAQpx3CZAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...>
Subject: Re: [testng-users] Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

 

Hi Krishnan,

 

Attaching console logs and project structure.



On Tuesday, September 5, 2017 at 2:07:56 PM UTC+5:30, Krishnan Mahadevan wrote:

Akshay,

 

I have tried using the below two flavors on my local machine (It runs on OSX) and it works fine.

 

Can you please add more context, to your problem statement including the folder structure of your workspace, and your console logs?

 

  1. **/target/surefire-reports/testng-results.xml

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/2/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

  1. **/testng-results.xml

 

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/3/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of <[hidden email]>
Reply-To: <[hidden email]>
Date: Tuesday, September 5, 2017 at 1:57 PM
To: testng-users <[hidden email]>
Subject: [testng-users] Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

 

Tried with / as well as \ in my Jenkins build config.

 

Also, I trigger my tests in Jenkins in below way (execute shell):

#!/bin/bash
 
if [ "$1" = "" ]; then
    echo "Please provide a valid suite XML file name."
else
    mvn clean
    mvn compile
    mvn clean test -Dsurefire.suiteXmlFiles="$1"
fi

 

It is strange how my testng-results.xml exists, but does not get picked up by Jenkins.


On Tuesday, September 5, 2017 at 12:52:51 PM UTC+5:30, [hidden email] wrote:

In my project workspace, the test-results.xml file exists inside the target\surefire-reports\testng-results.xml directory. But Jenkins fails to read the XML file and gives below error on console.

 

Jenkins build log:

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.
 
To ensure the file isn't too old, I had checked that the test-results.xml (and other files) belong to the latest test run.
 
Please help.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="dAQpx3CZAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="dAQpx3CZAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="https://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

akshay.maldhure
Found the required option to change the default workspace in my Jenkins project.

So I've added the path "$HOME/myWorkspace/myProject/" in my Jenkins project workspace, and "**/target/surefire-reports/testng-results.xml" in my TestNG setting, and it works! :)

Thank you Krishan for your help.

On Tuesday, September 5, 2017 at 2:39:43 PM UTC+5:30, [hidden email] wrote:
My bad, I provided the wrong log snippet (the one with a single *). I've actually tried it out with a lot of things. :P

So even with double asterisks (**), it does not work form me.

BTW, when I update the path in my Jenkins job to something like $HOME/myWorkspace/myProject/target/surefire-reports/testng-results.xml (an absolute path), Jenkins picks up the report and generates results out of it.

So it seems like an issue with the workspace path. How do I see my Jenkins job workspace?

On Tuesday, September 5, 2017 at 2:33:26 PM UTC+5:30, Krishnan Mahadevan wrote:

When I asked for folder structure of your workspace, I was talking about your Jenkins job workspace and not the one from your IDE.

 

Your console logs that you shared have this:

 

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 6.195s

[INFO] Finished at: Tue Sep 05 14:05:20 IST 2017

[INFO] Final Memory: 20M/319M

[INFO] ------------------------------------------------------------------------

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.

Finished: SUCCESS

 

 

You should be using ** (double asterisk) and not * (single asterisk)

 

So please change the pattern to **/target/surefire-reports/testng-results.xml or just use **/testing-results.xml

 

The ** (double aseterisk) indicates that the prefix for your path can be anything.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of <[hidden email]>
Reply-To: <[hidden email]>
Date: Tuesday, September 5, 2017 at 2:21 PM
To: testng-users <[hidden email]>
Subject: Re: [testng-users] Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

 

Hi Krishnan,

 

Attaching console logs and project structure.



On Tuesday, September 5, 2017 at 2:07:56 PM UTC+5:30, Krishnan Mahadevan wrote:

Akshay,

 

I have tried using the below two flavors on my local machine (It runs on OSX) and it works fine.

 

Can you please add more context, to your problem statement including the folder structure of your workspace, and your console logs?

 

  1. **/target/surefire-reports/testng-results.xml

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/2/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

  1. **/testng-results.xml

 

TestNG Reports Processing: START

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

Saving reports...

Processing '/Users/krmahadevan/.jenkins/jobs/test/builds/3/testng/testng-results.xml'

TestNG Reports Processing: FINISH

 

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of <[hidden email]>
Reply-To: <[hidden email]>
Date: Tuesday, September 5, 2017 at 1:57 PM
To: testng-users <[hidden email]>
Subject: [testng-users] Re: Jenkins TestNG plugin does not fetch results from the test-results.xml file.

 

Tried with / as well as \ in my Jenkins build config.

 

Also, I trigger my tests in Jenkins in below way (execute shell):

#!/bin/bash
 
if [ "$1" = "" ]; then
    echo "Please provide a valid suite XML file name."
else
    mvn clean
    mvn compile
    mvn clean test -Dsurefire.suiteXmlFiles="$1"
fi

 

It is strange how my testng-results.xml exists, but does not get picked up by Jenkins.


On Tuesday, September 5, 2017 at 12:52:51 PM UTC+5:30, [hidden email] wrote:

In my project workspace, the test-results.xml file exists inside the target\surefire-reports\testng-results.xml directory. But Jenkins fails to read the XML file and gives below error on console.

 

Jenkins build log:

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.
 
To ensure the file isn't too old, I had checked that the test-results.xml (and other files) belong to the latest test run.
 
Please help.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.