How to run no testcases, when -testnames value is not in suite ?

68 views
Skip to first unread message

Arkadiusz Ptak

unread,
Apr 25, 2016, 10:14:56 AM4/25/16
to testng-users
Hi,
To show my problem, here is some short example:

in suite we have defined tests: TC1,TC2,TC3, when we run tests with -testnames TC1 parameter, only TC1 will run - that is correct behavior,
but when we try to run it with -testnames TC4, all tests from suite will be executed(TC1,TC2,TC3). For me, that is incorrect behavior, I think there should be none testcases that wil be executed.
Is there any way to do it like this ?

BR,
Arkadiusz

⇜Krishnan Mahadevan⇝

unread,
Apr 28, 2016, 4:48:58 AM4/28/16
to testng...@googlegroups.com
Arkadiusz,

Going through the codebase it looks like TestNG is working as designed.


Cedric,
Do you think we should consider altering TestNG's current behavior of running <tests> if valid ones were specified. If no valid <test> names were found error out and abort execution [ Currently TestNG proceeds with executing the original suite ]

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/

--
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 testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Arkadiusz Ptak

unread,
Apr 28, 2016, 6:26:54 AM4/28/16
to testng-users
Hi,
In my opinion when if no valid <test> names are found the execution should be aborted. The fact that someone used -testnames parameters, tells us that this person wanted only to run these test which was passed in -testnames value. So if in suite there is no such tests, the execution should not be continued, because it will run no necessary tests.

Do you think that you can consider this change ?

BR,
Arkadiusz

⇜Krishnan Mahadevan⇝

unread,
Apr 28, 2016, 12:08:50 PM4/28/16
to testng...@googlegroups.com
Arkadiusz 

Thats a question that I would sidestep and let Cedric answer.

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/

Arkadiusz Ptak

unread,
May 18, 2016, 3:44:47 AM5/18/16
to testng-users
Hi,

Is there any progress in this case ?

BR,
Arkadiusz

⇜Krishnan Mahadevan⇝

unread,
Jun 4, 2016, 10:55:00 AM6/4/16
to testng...@googlegroups.com
Arkadiusz
Not much can be done until Cedric (or) the other core TestNG dev folks respond back on what should be the expected behavior.

Fixing this behavior as per your expectations may perhaps cause breakages in backward compatibility. That is why I would need Cedric (or) other core committer's nod on this.


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/

Reply all
Reply to author
Forward
0 new messages