TestNG Datadriven Framework: The dataFlag corresponding to only the last Test is being read | Selenium Forum
P
Pravin V. Kumbhare Posted on 22/12/2021

Hello sir,

 

I'm following exactly the same framework as you tought in TestNG Datadriven Framework. As tought in video 20, I'm capturing the dataFlag corresponding to an "execution" tag in the suite json. When I set this to a parameter and read the same in @BeforeTest function inside the BaseTest class, I see only the dataFlag of my last Test is invoked every time (not the dataFlag corresponding the Test number).

Although I'm running all three Tests with different dataFlag, I see only last-test dataFlag in the @BeforeTest. I'm unable to figure this out. 

Please help me (I'm almost about to complete the framework but stuck for this).

Attached is my code.


P
Pravin V. Kumbhare Replied on 23/12/2021

Hello sir,

Can you resolve this at your earliest please?

Attached screenshot shows the issue in more details (code is already attached above).

Responsive image

P
Pravin V. Kumbhare Replied on 24/12/2021

Hello sir,

Can you resolve this at your earliest please?

I'm almost about to complete the framework but stuck only for this.


P
Pravin V. Kumbhare Replied on 27/12/2021

Hello sir,

There's still no reply on this.

This is blocking me from reaching the end of framework.

I tried a lot for solutions outside, but there's nothing yet.


A
Ashish Replied on 05/01/2022

I am sorry for late reply.

Can you please mail me your project at info@qtpselenium.com