Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Parameter drive tests #151
Comments
We can call it providing parameter values by iterating over sql statement using We can also accept a function which returns a cursor. Parameters should be mapped by name if the column aliases in the query correspond equally or by position if not. |
|
Does this need to support query input? The model I have in mind is;
With this you have the same capability, just without exposing SQL to the annotation. My concern is opening up avenue of issues where users want to persist test / results data to drive tests rather that keep tests isolated and UtPLSQL clean from data storage. |
|
I agree with @mathewbutler. I guess the better option is to preset all test data (like
No offense, guys, just thoughts out of my head :) |
|
We should look at something like this: |
I like the Functionality that the @MethodSource annotation in jUnit has. It provides a Stream of (multiple) parameters that are handed to the test executions. Like a rowtype in a way... |
There is an interesting extension to JUnit:
https://github.com/Pragmatists/JUnitParams
We could think of implementing something similar.
Here are examples of different ways to use it.
https://github.com/Pragmatists/JUnitParams/blob/master/src/test/java/junitparams/usage/SamplesOfUsageTest.java