jbwt
jbwt

Reputation: 394

TestNG: initialise data provider once for all methods

Currently I have a test class which has multiple methods all using the same data provider. Each time testng loops through the different methods, it recomputes the data provider method. Is there any way I can make the data provider run once?

Thanks!

Jason

Upvotes: 0

Views: 682

Answers (1)

juherr
juherr

Reputation: 5740

Factories are exactly what you are looking for.

Upvotes: 1

Related Questions