TestNG xml, Classes skipped for execution

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

TestNG xml, Classes skipped for execution

Srikanth Rao Melagiri
Hi,

I am trying to execute the below TestNG xml:

<test name="ABC">
<classes>
<class name="com.xyz.package1.ABCTests">
<methods>
<include name="REG_001_ABCControlsTest"/>
</methods>
</class>
<class name="com.xyz.package1.XYZTests">
<methods>
<include name="REG_002_XYZControlsTest"/>
                                        <include name="REG_003_XYZControlsTest"/>
</methods>
</class>
<class name="com.xyz.package2.PQRTests">
<methods>
<include name="REG_004_PQRControlsTest"/>
</methods>
</class>
</classes>
</test>

On trying this, the execution is happening only for the tests included in the third class tag. If i remove the third part, then there won't be any tests run. I am not able to understand what is missing. 

Result if the third class tag set is removed:

[RemoteTestNG] detected TestNG version 6.14.2
Test Log Folder 'C:\Automation\USERNAME\TestLogs\USERNAME_17-07-18_05-12-20' created.
Test Suite: abc Execution Initiated.
Test Suite: abc Execution Complete.

===============================================
Feature Test suite
Total tests run: 0, Failures: 0, Skips: 0
===============================================

Any help would be appreciated. Thanks!

--
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: TestNG xml, Classes skipped for execution

⇜Krishnan Mahadevan⇝

Srikanth,

Can you please do the following:

 

  1. Please retry using TestNG v6.14.3 (latest released version as of today)
  2. If the issue is still reproducible then please help share all the classes involved along with the suite xml file. Please remember to trim down your class such that it doesn’t use any external library and just resorts to using a bunch of System.out.println to reproduce the bug. That way its easier for us to use it recreate the issue.

 

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 Srikanth Rao Melagiri <[hidden email]>
Reply-To: <[hidden email]>
Date: Tuesday, July 17, 2018 at 5:29 PM
To: testng-users <[hidden email]>
Subject: [testng-users] TestNG xml, Classes skipped for execution

 

Hi,

 

I am trying to execute the below TestNG xml:

 

<test name="ABC">

                                <classes>

                                                <class name="com.xyz.package1.ABCTests">

                                                                <methods>

                                                                                <include name="REG_001_ABCControlsTest"/>

                                                                </methods>

                                                </class>

                                                <class name="com.xyz.package1.XYZTests">

                                                                <methods>

                                                                                <include name="REG_002_XYZControlsTest"/>

                                        <include name="REG_003_XYZControlsTest"/>

                                                                </methods>

                                                </class>

                                                <class name="com.xyz.package2.PQRTests">

                                                                <methods>

                                                                                <include name="REG_004_PQRControlsTest"/>

                                                                </methods>

                                                </class>

                                </classes>

                </test>

 

On trying this, the execution is happening only for the tests included in the third class tag. If i remove the third part, then there won't be any tests run. I am not able to understand what is missing. 

 

Result if the third class tag set is removed:

 

[RemoteTestNG] detected TestNG version 6.14.2

Test Log Folder 'C:\Automation\USERNAME\TestLogs\USERNAME_17-07-18_05-12-20' created.

Test Suite: abc Execution Initiated.

Test Suite: abc Execution Complete.

 

===============================================

Feature Test suite

Total tests run: 0, Failures: 0, Skips: 0

===============================================

 

Any help would be appreciated. Thanks!

--
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.