Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for data driven testing #1265

Open
UdiPlsql opened this issue Aug 5, 2023 · 2 comments
Open

Support for data driven testing #1265

UdiPlsql opened this issue Aug 5, 2023 · 2 comments

Comments

@UdiPlsql
Copy link

UdiPlsql commented Aug 5, 2023

Is your feature request related to a problem? Please describe.
It would be better that we have an option for data driven testing using a data table similar to junit. The purpose is, then we could iterate the same invocation for method under test for multiple data input combinations.

Example

Inputparam1|Inputparam2|expected
10|uditha|success
0|guest|unsuccess

So that we could iterate the test for multiple input combinations.

Data driven approach for unit testing is more powerful. Because a developer could improve the test coverage by expanding the data table.

Note

Please do not create issues for generic SQL or PL/SQL questions. There are other forums and communities to help you with those. See ASKTom for example.

Want to discuss
If you want to discuss your issue, join our SLACK chat.

@lwasylow
Copy link
Member

lwasylow commented Aug 5, 2023

This is duplicate #1028
As for data driven current approach is debatable but more likely I would be inclined to implement parameters and let users create own data tables if needs be.
However parameters are quite complex subject given you should be able pass any type and any number.

Have you considered implementation of a loop in your own test for example
For I in select from data table
Loop
Execute proc with param
Assert, result
End loop

It will not produce a multiple test results in report but will achieve task.

Cheers Lukasz

@UdiPlsql
Copy link
Author

UdiPlsql commented Aug 5, 2023

Thanks Lukasz,

Yes.. you are right about parameters. It is a complex matter with different types as well as with parameter list varies from function to function.

Yes we intend to use 'loop' for data driven tests, but we are more excited to see an option similar to Junit OR testNG style param tables should possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants