[testng-dev] TestNG appends instance count to the test name in reports

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

[testng-dev] TestNG appends instance count to the test name in reports

zathras
TestNG appends instance count to the test name in reports, and this is not what I want. I can't use a report listener,because I'm running in ADO, and they only use the default report builder. I don't want this number appended, because it effectly changes the test name, so test case history is skewed, if I have retries on failure. 

I've tried all of the renaming techniques I could find, and they work fine, except for the [<incident>] number appended to the name. 

Here's and example of what I'm seeing. The ones with dataproviders have the unwanted appendage. 

<testsuite name="test.RetryExperiment" tests="7" skipped="0" failures="0" errors="0" timestamp="2019-03-18T11:57:07" hostname="ebishop" time="38.206">
<properties/>
<testcase name="RetryExperiment.dataProviderRetryTest [0](a, thing for a)" classname="test.RetryExperiment" time="0.002"/>
<testcase name="RetryExperiment.dataProviderRetryTest [1](b, thing for b)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest [2](x, thing for x)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [0](Durok, red)" classname="test.RetryExperiment" time="0.0"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [1](Hampshire, Black with white stripe.)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [2](Chester White, White)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.simpleRetryTest " classname="test.RetryExperiment" time="0.0"/>

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [testng-dev] TestNG appends instance count to the test name in reports

Krishnan Mahadevan
>>>> I can't use a report listener,because I'm running in ADO,

I didnt quite understand this. Why do you say you cannot use/build your own listener? 

Also can you please tell me what xml report are you referring to here?

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 Scribblings @ https://rationaleemotions.com/


On Tue, Mar 19, 2019 at 1:37 AM zathras <[hidden email]> wrote:
TestNG appends instance count to the test name in reports, and this is not what I want. I can't use a report listener,because I'm running in ADO, and they only use the default report builder. I don't want this number appended, because it effectly changes the test name, so test case history is skewed, if I have retries on failure. 

I've tried all of the renaming techniques I could find, and they work fine, except for the [<incident>] number appended to the name. 

Here's and example of what I'm seeing. The ones with dataproviders have the unwanted appendage. 

<testsuite name="test.RetryExperiment" tests="7" skipped="0" failures="0" errors="0" timestamp="2019-03-18T11:57:07" hostname="ebishop" time="38.206">
<properties/>
<testcase name="RetryExperiment.dataProviderRetryTest [0](a, thing for a)" classname="test.RetryExperiment" time="0.002"/>
<testcase name="RetryExperiment.dataProviderRetryTest [1](b, thing for b)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest [2](x, thing for x)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [0](Durok, red)" classname="test.RetryExperiment" time="0.0"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [1](Hampshire, Black with white stripe.)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [2](Chester White, White)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.simpleRetryTest " classname="test.RetryExperiment" time="0.0"/>

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [testng-dev] TestNG appends instance count to the test name in reports

zathras
In ADO, they only use reports created from the default Junit reporter. I have not tried overriding the TestNG default reporter, but I assume it's the same deal. 

On Tue, Mar 19, 2019 at 9:51 PM ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
>>>> I can't use a report listener,because I'm running in ADO,

I didnt quite understand this. Why do you say you cannot use/build your own listener? 

Also can you please tell me what xml report are you referring to here?

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 Scribblings @ https://rationaleemotions.com/


On Tue, Mar 19, 2019 at 1:37 AM zathras <[hidden email]> wrote:
TestNG appends instance count to the test name in reports, and this is not what I want. I can't use a report listener,because I'm running in ADO, and they only use the default report builder. I don't want this number appended, because it effectly changes the test name, so test case history is skewed, if I have retries on failure. 

I've tried all of the renaming techniques I could find, and they work fine, except for the [<incident>] number appended to the name. 

Here's and example of what I'm seeing. The ones with dataproviders have the unwanted appendage. 

<testsuite name="test.RetryExperiment" tests="7" skipped="0" failures="0" errors="0" timestamp="2019-03-18T11:57:07" hostname="ebishop" time="38.206">
<properties/>
<testcase name="RetryExperiment.dataProviderRetryTest [0](a, thing for a)" classname="test.RetryExperiment" time="0.002"/>
<testcase name="RetryExperiment.dataProviderRetryTest [1](b, thing for b)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest [2](x, thing for x)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [0](Durok, red)" classname="test.RetryExperiment" time="0.0"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [1](Hampshire, Black with white stripe.)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [2](Chester White, White)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.simpleRetryTest " classname="test.RetryExperiment" time="0.0"/>

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [testng-dev] TestNG appends instance count to the test name in reports

Krishnan Mahadevan
Have you tried extending the default JUnit Reporter that TestNG provides, customize it to your needs and then work with it ?
You could try disabling the default reports. That way the one that TestNG internally has is not used, and yours get used instead.

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 Scribblings @ https://rationaleemotions.com/


On Thu, Mar 21, 2019 at 2:47 AM Eddie Bishop <[hidden email]> wrote:
In ADO, they only use reports created from the default Junit reporter. I have not tried overriding the TestNG default reporter, but I assume it's the same deal. 

On Tue, Mar 19, 2019 at 9:51 PM ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
>>>> I can't use a report listener,because I'm running in ADO,

I didnt quite understand this. Why do you say you cannot use/build your own listener? 

Also can you please tell me what xml report are you referring to here?

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 Scribblings @ https://rationaleemotions.com/


On Tue, Mar 19, 2019 at 1:37 AM zathras <[hidden email]> wrote:
TestNG appends instance count to the test name in reports, and this is not what I want. I can't use a report listener,because I'm running in ADO, and they only use the default report builder. I don't want this number appended, because it effectly changes the test name, so test case history is skewed, if I have retries on failure. 

I've tried all of the renaming techniques I could find, and they work fine, except for the [<incident>] number appended to the name. 

Here's and example of what I'm seeing. The ones with dataproviders have the unwanted appendage. 

<testsuite name="test.RetryExperiment" tests="7" skipped="0" failures="0" errors="0" timestamp="2019-03-18T11:57:07" hostname="ebishop" time="38.206">
<properties/>
<testcase name="RetryExperiment.dataProviderRetryTest [0](a, thing for a)" classname="test.RetryExperiment" time="0.002"/>
<testcase name="RetryExperiment.dataProviderRetryTest [1](b, thing for b)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest [2](x, thing for x)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [0](Durok, red)" classname="test.RetryExperiment" time="0.0"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [1](Hampshire, Black with white stripe.)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [2](Chester White, White)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.simpleRetryTest " classname="test.RetryExperiment" time="0.0"/>

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [testng-dev] TestNG appends instance count to the test name in reports

zathras
How do I disable the default?

On Wed, Mar 20, 2019 at 11:37 PM ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
Have you tried extending the default JUnit Reporter that TestNG provides, customize it to your needs and then work with it ?
You could try disabling the default reports. That way the one that TestNG internally has is not used, and yours get used instead.

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 Scribblings @ https://rationaleemotions.com/


On Thu, Mar 21, 2019 at 2:47 AM Eddie Bishop <[hidden email]> wrote:
In ADO, they only use reports created from the default Junit reporter. I have not tried overriding the TestNG default reporter, but I assume it's the same deal. 

On Tue, Mar 19, 2019 at 9:51 PM ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
>>>> I can't use a report listener,because I'm running in ADO,

I didnt quite understand this. Why do you say you cannot use/build your own listener? 

Also can you please tell me what xml report are you referring to here?

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 Scribblings @ https://rationaleemotions.com/


On Tue, Mar 19, 2019 at 1:37 AM zathras <[hidden email]> wrote:
TestNG appends instance count to the test name in reports, and this is not what I want. I can't use a report listener,because I'm running in ADO, and they only use the default report builder. I don't want this number appended, because it effectly changes the test name, so test case history is skewed, if I have retries on failure. 

I've tried all of the renaming techniques I could find, and they work fine, except for the [<incident>] number appended to the name. 

Here's and example of what I'm seeing. The ones with dataproviders have the unwanted appendage. 

<testsuite name="test.RetryExperiment" tests="7" skipped="0" failures="0" errors="0" timestamp="2019-03-18T11:57:07" hostname="ebishop" time="38.206">
<properties/>
<testcase name="RetryExperiment.dataProviderRetryTest [0](a, thing for a)" classname="test.RetryExperiment" time="0.002"/>
<testcase name="RetryExperiment.dataProviderRetryTest [1](b, thing for b)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest [2](x, thing for x)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [0](Durok, red)" classname="test.RetryExperiment" time="0.0"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [1](Hampshire, Black with white stripe.)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [2](Chester White, White)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.simpleRetryTest " classname="test.RetryExperiment" time="0.0"/>

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [testng-dev] TestNG appends instance count to the test name in reports

Krishnan Mahadevan
If you are running with Maven, you can add it as a property to your surefire plugin section.

Something like this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.19.1</version>
    <executions>
        <execution>
            <phase>test</phase>
        </execution>
    </executions>
    <configuration>
        <properties>
            <property>
                <name>usedefaultlisteners</name>
                <value>false</value>
            </property>
        </properties>
    </configuration>
</plugin>

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 Scribblings @ https://rationaleemotions.com/


On Fri, Mar 22, 2019 at 6:24 AM Eddie Bishop <[hidden email]> wrote:
How do I disable the default?

On Wed, Mar 20, 2019 at 11:37 PM ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
Have you tried extending the default JUnit Reporter that TestNG provides, customize it to your needs and then work with it ?
You could try disabling the default reports. That way the one that TestNG internally has is not used, and yours get used instead.

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 Scribblings @ https://rationaleemotions.com/


On Thu, Mar 21, 2019 at 2:47 AM Eddie Bishop <[hidden email]> wrote:
In ADO, they only use reports created from the default Junit reporter. I have not tried overriding the TestNG default reporter, but I assume it's the same deal. 

On Tue, Mar 19, 2019 at 9:51 PM ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
>>>> I can't use a report listener,because I'm running in ADO,

I didnt quite understand this. Why do you say you cannot use/build your own listener? 

Also can you please tell me what xml report are you referring to here?

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 Scribblings @ https://rationaleemotions.com/


On Tue, Mar 19, 2019 at 1:37 AM zathras <[hidden email]> wrote:
TestNG appends instance count to the test name in reports, and this is not what I want. I can't use a report listener,because I'm running in ADO, and they only use the default report builder. I don't want this number appended, because it effectly changes the test name, so test case history is skewed, if I have retries on failure. 

I've tried all of the renaming techniques I could find, and they work fine, except for the [<incident>] number appended to the name. 

Here's and example of what I'm seeing. The ones with dataproviders have the unwanted appendage. 

<testsuite name="test.RetryExperiment" tests="7" skipped="0" failures="0" errors="0" timestamp="2019-03-18T11:57:07" hostname="ebishop" time="38.206">
<properties/>
<testcase name="RetryExperiment.dataProviderRetryTest [0](a, thing for a)" classname="test.RetryExperiment" time="0.002"/>
<testcase name="RetryExperiment.dataProviderRetryTest [1](b, thing for b)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest [2](x, thing for x)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [0](Durok, red)" classname="test.RetryExperiment" time="0.0"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [1](Hampshire, Black with white stripe.)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.dataProviderRetryTest2 [2](Chester White, White)" classname="test.RetryExperiment" time="0.001"/>
<testcase name="RetryExperiment.simpleRetryTest " classname="test.RetryExperiment" time="0.0"/>

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-dev" 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-dev.
For more options, visit https://groups.google.com/d/optout.