Is there a way to add group names before executing a test?

97 views
Skip to first unread message

Suram Sridhar Reddy

unread,
Apr 25, 2022, 11:40:01 PM4/25/22
to testng...@googlegroups.com
For each test (@Test) we have to add the group names dynamically before executing them. 
Before executing @Test method, data provider is invoked and it will give the list of group names to that particular test case falls in.

Is there any way to add group names to @Test before executing them?
Based on the group name which we pass from testng.xml should run only those cases.
Please guide me if we have any existing solution for this use case.

--
Thanks
S Sridhar 

⇜Krishnan Mahadevan⇝

unread,
Apr 26, 2022, 12:00:44 AM4/26/22
to testng-users
Please make use of IAnnotationTransformer and then perhaps wire in this listener via a Service Provider Interface driven mechanism so that it gets invoked automatically without having to explicitly specify it.

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/


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/CAG%2B_6Xoko6yTN9Y4%2BRC3o6YwMKffKLeRnXcTx_2EmnuKnCaVKw%40mail.gmail.com.

Suram Sridhar Reddy

unread,
Apr 27, 2022, 12:36:52 AM4/27/22
to testng...@googlegroups.com
Could someone please help me with this. Is this possible?

⇜Krishnan Mahadevan⇝

unread,
Apr 27, 2022, 1:36:55 AM4/27/22
to testng-users
Sridhar,


Did you try it ? What was not working in that ?

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/

--
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.
Reply all
Reply to author
Forward
0 new messages