Query: loadData in DataDrivenTest class file called multiple times
Closed this issue · 3 comments
Why are we calling loadData three times in DataDrivenTest class, I think it will be sufficient to call two times
- once per class file,
- where ever method level annotation has seperate DataLoader annotation
In ParamAnchor constructor, can't we use data from DataConext?
In computeTestMethods(), can't we check if DataLoader annontation exist for the method, and if exist then call loadData, else use data from DataContext?
For me, it looks we are doing bit complex logic and trying to loadData multiple times.
Ofcourse, everything is working fine, but when I am trying to add ActualResult to dataMap, in debugging mode I saw DataContext is not accurate some times.
Let me know your views.
Yes you are correct Ravi. There are few bugs in the code that's in Github. Also, as the code currently is in Github, it is complicated. But I have it sorted out on my local. I am looking at one bug that's still unsolved. Once I have it figured, I will release the better version of DataDrivenTest in the repository.
BTW, do you have a better name for the test runner. I just named it DataDrivenTest, but somehow I don't get the feel of it. Do suggest something if you can.
Cheers!
JUnitExternalizedTestDataRunner
JUnitExtendedTestDataRunner
RegressionTestDataRunner
TestHarnessRunner -- based on http://en.wikipedia.org/wiki/Test_harness
these things came to my mind immediately, i will also think if some more better name exists.
Thus is done.