Reputation: 907
I can't figure out how to integrate TestNG XML
with Data Providers from an Excel Sheet.
I have confirmed my code Data Provider syntax is correct as my test runs successfully when I run it from the Test Level (See Below)
However, when I try to implement the Data Provider Using the TestNG XML
Configuration (I am trying to run usernames and passwords against multiple browsers) I am getting a Java IOException and (as those can be pretty vague) I am not sure how to proceed.
Please see the screenshots included below of the same test set up implementing the Parameters in the before method as well as the TestNG XML
.
Thanks for any help!
Upvotes: 1
Views: 426
Reputation: 5740
Even if it is working at test level, TestNG is doing what it supposed to do (calling methods).
So, the problem is located in your LoginDataSheet#getTableArray(...)
which is throwing an IOException depending on how you run your test.
Upvotes: 1