Open leo-13 opened 11 years ago
Another issue here is that I see first constructor call prior to DataProvider call. Why could this happen?
I am also running into this issue. Are there any plans to fix this?
Lazy initialization using an iterator works perfectly when the data provider is specified in a Test annotation, but NOT when it is specified in a Factory annotation.
The current architecture of testng create all instances, collect tests, order them and run them.
To fix this issue, we will have to change a lot, what is not planned yet.
+1
This is needed!
Steps to reproduce:
Actual result:
No lazy initialization. All instances are created before the tests are started:
Creating instance for test1 Creating instance for test2 Creating instance for test3 Setup test: test3 Running test: test3 Setup test: test2 Running test: test2 Setup test: test1 Running test: test1
Expected result:
Lazy initialization looking like this: Creating instance for test1 Setup test: test1 Running test: test1 Creating instance for test2 Setup test: test2 Running test: test2 Creating instance for test3 Setup test: test3 Running test: test3