Junit - part 1 - static parametrization | Selenium Forum
A
Ankit Sony Posted on 03/07/2021
 

Hi Ashish,

in the tutorial "Junit Framework with Selenium-1", we are creating 2 dimensional array for parameterization.

why the collections are made static during delcaration?

I tried removing the static keyword and ran the Junit project, but the Junit test is failing with below error :

"Method 'InitializationError' not found. Opening the test class."

Tried googling but didnt get much of an info.

Request your inputs on the same.

 

Regards,

Ankit


A
Ashish Thakur Replied on 05/07/2021

its static so that it can be called without creating object

Junit calls it without creating object of the class


A
Ankit Sony Replied on 03/08/2021

 

Thank you !
This helps.