database-rider / database-rider

Database testing made easy!

Home Page:https://database-rider.github.io/database-rider

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extract base class MapDataSet from JSONDataSet, to simplify integration with other test frameworks

beskow opened this issue · comments

RiderDSL provides an excellent mechanism for incorporating DbRider/DbUnit in other test frameworks and execution environments (such as e.g the Karate test framework). In such scenarios, DataSets might be created separately by the external test framework, and provided to RiderDSL for creation or validation.

DataSets based on java.util.Map provides a solid ground for such interoperability. The current JSONDataSet implementation in DbRider uses the java.util.Map output of the Jackson JSON parser to construct the DbUnit ITables. By extracting the java.util.Map based implementation into a separate Base class (which JSONDataSet would then extend) greatly simplifies integration with external frameworks.

I successfully use DbRider together with the Karate framework, which provides a really flexible and powerful combination.
I'll submit a pull request for this refactoring.