Is there a way to get the class variables into the testNG before method of super class

23 views
Skip to first unread message

chenna kesava

unread,
May 4, 2021, 2:18:50 PM5/4/21
to testng-dev

I have @test methods in a class1 and @before method in super class. 

Is there a way to get the class variable declared in class1 to be accessed in @before method.

⇜Krishnan Mahadevan⇝

unread,
May 5, 2021, 3:26:00 AM5/5/21
to testn...@googlegroups.com
Please share sample that can help us understand what is your question? Also what happens when you try doing this? Do you face any issues ? If yes what is the issue you are facing? Make sure you are using TestNG 7.4.0 (latest released version of TestNG).

Lastly, for TestNG usage questions, please post them on the testng-users google forums.

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, May 4, 2021 at 11:48 PM chenna kesava <chennakesa...@gmail.com> wrote:

I have @test methods in a class1 and @before method in super class. 

Is there a way to get the class variable declared in class1 to be accessed in @before method.

--
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 testng-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-dev/5b890da6-4606-412c-985e-54f89598dc47n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages