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

Give warning if running on older utPLSQL #70

Closed
jgebal opened this issue Jul 13, 2019 · 1 comment · Fixed by #71
Closed

Give warning if running on older utPLSQL #70

jgebal opened this issue Jul 13, 2019 · 1 comment · Fixed by #71
Assignees
Milestone

Comments

@jgebal
Copy link
Member

jgebal commented Jul 13, 2019

When I tried running test via SQLDeveloper extension on utPLSQL v3.1.2 I got surprised by lack of test window.

It would be nice if we could get some info/warning to users that would inform them why tests are not running with nice new UI.
Even something like a comment in SQLDeveloper worksheet would be great to say:

-- Running with SQL worksheet
-- detected utPLSQL v3.1.2.2130
-- you need utPLSQL v3.1.7 or above to use the test-runner UI
EXECUTE dbms_session.reset_package;
SET SERVEROUTPUT ON SIZE UNLIMITED
CLEAR SCREEN
EXECUTE ut.run('UT3$USER#');
@PhilippSalvisberg
Copy link
Member

I agree that the requirements for the realtime reporter should be visible somewhere. I suggest to include it in the preferences dialog. As a hint for the Use realtime reporter? option. Here's the preview:

image

This way it becomes clear, why a worksheet (instead of the fancy realtime reporter) is opened when running a test with utPLSQL v3.1.2. The user needs to open the preferences dialog, of course. But when the extension does not behave as expected, this is most probably something the user will do anyway.

Actually, I do not want to "pollute" the code put into the worksheet with warning messages. For several reasons.

  • It uses more space.
    Currently the worksheet is automatically resized. 15% for the code (which usually needs 2-4 lines depending on the configuration) and 85% for the script output pane. This works quite well for most screen sizes, even if a reasonable sized log pane is visible at the bottom. Adding 3 additional lines will require a change of that logic as well.

  • The worksheet does not know, if was called as a "second option"
    Even if you configure to use the realtime reporter, you can run tests in a worksheet. Using the worksheet to run tests is not deprecated. For the worksheet it is irrelevant which version of utPLSQL is used. In fact, it's currently even running when no utPLSQL is installed (see Improve error handling when no utPLSQL is installed #64). To make the worksheet report warnings regarding the utPLSQL version it needs an additional call parameter. Something like calledByIntention. While this is possible, I do not like it. It feels wrong. It's not a feature a worksheet should provide.

  • This would become a precedent
    There are other areas where we could but we do not provide warnings, regarding the utPLSQL version used. For example, the warnings within the realtime reporter. When you use a utPLSQL version 3.1.4 or 3.1.6 then no warning will be displayed. Never. In such a case we could populate a warning within the warning. But this will have an impact on the behavior of the realtime reporter. A no-go IMHO.

  • The extensions works with utPLSQL v3.0.0 and higher
    This extension was designed to work with any utPLSQL 3 version providing a ut.version (see also Manage utPLSQL core compatiblity explicitely #46). From a maintenance point of view I'd like to minimize the effort to achieve that. One action is to suppress warnings and informational message regarding how the extension could behave when another utPLSQL version would have been used.

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

Successfully merging a pull request may close this issue.

2 participants