Test Data Supplier (TestNG DataProvider wrapper)
If you are a big fan of Stream and Collection API for data manipulation in the modern Java world, give a shot to this library that contains TestNG DataProvider wrapper (as of writing this blog, the latest version is based on TestNG 7.4.0) which helps to supply test data in a more flexible way.
Supported return types
- Collection
- Map
- Entry
- Object[]
- double[]
- int[]
- long[]
- Stream / StreamEx
- Tuple
- A single Object of any common or custom type
As it can return StreamEx, it gives you more power to play with flatmap, indices, transposing, etc.
You can find more details and sample Gradle/Maven projects on their official GitHub repository page: https://github.com/sskorol/test-data-supplier
Enjoyed reading this article? Please share the knowledge with your friends and colleagues.