utPLSQL
utPLSQL copied to clipboard
Enable of parallelism inside framework
Hello! I have a suite of tests that take a long time to run. Test packages are independent of each other. I want to run tests in parallel using utPLSQL. I seem to be able to do this simply by using the DBMS_PARALLEL_EXECUTE package. I want to try to modify the framework and add this to your repository. This will be my first experience of participating in open source. I think this feature would be quite useful for other teams as well. I suppose it's not that simple, otherwise you would have added this feature long ago. Can you tell me how you see this possibility in your architecture. Maybe I would try.
Unfortunately, I was unable to get into your Slack. None of your links are working.
PS Sorry for my english. I am just learning.
Hey @viktorov-aa
at the moment, we are not planning to add parallelism support to the framework, because it will add a lot of complexity (especially regarding the testing of the framework). There is an easy workaround to have parallel tests executed by calling utPLSQL-cli multiple times with different tags, so we don't see an absolute need. On top of that, we are already stuggling with maintaining the existent code base, since we all do this in our free time (and times are quite challenging atm :) )
According to the slack: Here's an invite link, valid for 30 days https://join.slack.com/t/utplsql/shared_invite/zt-rzf6h7w2-mpDdFOrSDv6vSHl98X1RYw
Cheers, Sam
See also https://github.com/utPLSQL/utPLSQL/issues/881
Thanks for your reply. We are using teamcity. We run tests through sqlplus:
BEGIN
ut.run(ut_teamcity_reporter());
END;
/
I want to run multiple tests in parallel using utPLSQL-cli
>utplsql run <ConnectionURL> --tags=stream1 -f=ut_teamcity_reporter
>utplsql run <ConnectionURL> --tags=stream2 -f=ut_teamcity_reporter
>utplsql run <ConnectionURL> --tags=stream3 -f=ut_teamcity_reporter
I have a question. Will ut_teamcity_reporter work normally, or is it necessary to do something else? I cannot try it myself, because I do not have the required access.
UPD: I figured it out. My question is not relevant
I had a look at junit5 about parallel and way its implemented there is the annotation declaration for suite or test methods. In their implementation it allows for permutations of parallel suites or test methods.
I think we should start with an annotation on the suite to parallelize all tests under it. Author is responsible for making them paralell safe.
So the suites will call serially but tests within suites that is annotated would run parallel.
The results would have to be stored in the table as the chunks will be run by different sessions.
The sample annotation couls looks like --%parallel(4)
In case of nested suite the parallel wil be inherited to child suites. The child suites will be run serial however the tests within these suites will run parallel as defined by parent suite.
We will have to make sure that coverage data will be linked to same runid or at least we are able to merge them from child session to coordinator session, same goes for reporting.