-
Notifications
You must be signed in to change notification settings - Fork 17
Code coverage is not working properly #99
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
Comments
Hi @horimre, I've installed plscope-utils and then right-clicked on and then pressed So, it should work to run code coverage for single test package only. And it should work for multiple test packages as well. I've used Oracle Database 19.7. But it should work also in 12.2. What do you mean with
No dialog? No result? both? Does Thanks, |
Hi, There is no dialog, and no result. Thanks, |
Thanks for the details. utPLSQL v3.1.9 is good enough. That should not be the problem. |
Right, it is working when I run it from the connection. The dialog shows up I can run it and see the report. |
Could you please run the following query? Please amend the lines commented with
Please let me know your database version as well and if you are running it in a PDB. Thank you. |
DEP_NAMEUTPLSQL.UT_EXPECTATION Oracle Database 18c (18.0.0.0.0), running it in a PDB. |
Thanks. And, does the query work? |
yes, that is the result of the query: DEP_NAMEUTPLSQL.UT_EXPECTATION |
Nevermind, this must be some sort of setup issue on my side. The result and runtime should be the same when I run it from the connection and provide the package name in the include objects section. I'll just keep running it that way. |
Yes, that's a workaround. However, I consider it a bug, when the code coverage dialog does not show up when called from a test package node. To fix it, we have to reproduce it. Could you please open |
There is no error message in the log. It is empty. |
I'm running out of ideas. I cannot reproduce it on my side. I guess I could provide an intermediate version of the extension with extensive logging to narrow down the problem area. Let me know if you are interested to dig deeper. Thanks. |
Okay I'm in. |
Perfect. Thank you. Could you please do as the following: 1. Configure Logging in SQL Developer 19.4.0In the This is basically the default behaviour plus full logging for utPLSQL. 2. Update utPLSQL for SQL DeveloperDownload utplsql_for_SQLDev_1.1.2-SNAPSHOT.zip and install it. This will require a restart and after that the new logging settings will be active. 3. Open View -> LogClick on the "Messages" tab. 4. Open Code Coverage for a packageRight click on a test package and select `Code coverage...`` 5. Check logging outputIn my case the log output looks like this:
I expect that your logging output contains an error message. That hopefully should help us to determine the next steps. Please post the output after |
It seems that it fails because I do not have privilege to access dba_dependencies. The query runs with all_dependencies though.
|
That's strange. I check the accessibility to
If the query fails with an exception then Does this query work with the user you are testing? I mean access to |
Yes, exactly. The user I am using can access |
Ok, thank you for the feedback. Happy we found the culprit. The check is a bit naïve, so I have to improve it. I'll read the documentation and think about a good alternative. The I'll look into it later this evening and will update this issue. |
okay, sure thank you! |
@horimre I think I found a solution. Could you please download the updated utplsql_for_SQLDev_1.1.2-SNAPSHOT.zip and install it? Please let and let me know if it works in your environment. Thank you. |
@PhilippSalvisberg it is working now, thank you! 🙂 The code coverage is running for a very long time though. I have created a package which contains a dummy function (adds 1 to a number parameter and returns the result) then created a test package with a single unit test for the function. It took 30 seconds for the dialog to pop up and approx 4-5mins for the coverage to finish and display the results. I have also tried to run it from sql instead of using the extension, but it also took approximately 3 minutes to finish. I used the below commands.
I am sure it is partly because my environment is a bit slow. Thanks, |
Yes. As you see in the logs (it contains also my time to click on the
One thing is for sure the access to the
and you will experience better performance. I suggest to get the grants. Look at the statement logs. SQL Developer logs every statement with the time it took. It should reveal the culprit and you should get a better idea where having access to the When the code coverage is slow in the worksheet as well, then the issue is not related to the SQL Developer extension. Since, the original issue (code coverage not working from a test package node) is solved, I'm going to close this issue. Thanks for reporting this bug and your help in finding the cause. |
sure, thank you for fixing the issue in such a short time, and for your advices on performance as well! |
Hi,
When I right click on a specific package/procedure/function and try to run code coverage, it does not do anything.
Code coverage is only working when I select the whole DB.
Is this behaviour intentional?
I tried with SQLDeveloper v19.4.0 extension v1.1.0 and 1.1.1.
Thanks,
Imre
The text was updated successfully, but these errors were encountered: