GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Code Coverage does not exclude Tests · Issue #1222 · utPLSQL/utPLSQL

Code Coverage does not exclude Tests #1222

New issue
Copy link
New issue
Copy link
Closed
#1226
Closed
Code Coverage does not exclude Tests#1222
#1226
Copy link
Assignees
jgebal
Labels
bug
Milestone
v3.1.13

Description

@wolframhaussig
wolframhaussig
opened on Aug 2, 2022
Issue body actions

Describe the bug
I have a problem which might relate to #393. I use SqlDeveloper and the utPLSQL plugin to create code coverage and get the Packages containing the tests in the coverage report.

Provide version info
Information about utPLSQL and Database version,

19.0.0.0.0
19.0.0

PL/SQL-Prozedur erfolgreich abgeschlossen.

UT_VERSION                                                  
------------------------------------------------------------
v3.1.12.3589


BANNER                                                                           BANNER_FULL                                                                                                                                                      BANNER_LEGACY                                                                        CON_ID
-------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production           Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production                                                                                           Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production                    0
                                                                                 Version 19.15.0.0.0                                                                                                                                                                                                                                         



PARAMETER                      VALUE                                                           
------------------------------ ----------------------------------------------------------------
NLS_LANGUAGE                   GERMAN                                                          
NLS_TERRITORY                  GERMANY                                                         
NLS_CURRENCY                   €                                                               
NLS_ISO_CURRENCY               GERMANY                                                         
NLS_NUMERIC_CHARACTERS         ,.                                                              
NLS_CALENDAR                   GREGORIAN                                                       
NLS_DATE_FORMAT                DD.MM.RR HH24:MI:SS                                             
NLS_DATE_LANGUAGE              GERMAN                                                          
NLS_SORT                       BINARY                                                          
NLS_TIME_FORMAT                HH24:MI:SSXFF                                                   
NLS_TIMESTAMP_FORMAT           DD.MM.RR HH24:MI:SSXFF                                          

PARAMETER                      VALUE                                                           
------------------------------ ----------------------------------------------------------------
NLS_TIME_TZ_FORMAT             HH24:MI:SSXFF TZR                                               
NLS_TIMESTAMP_TZ_FORMAT        DD.MM.RR HH24:MI:SSXFF TZR                                      
NLS_DUAL_CURRENCY              €                                                               
NLS_COMP                       BINARY                                                          
NLS_LENGTH_SEMANTICS           CHAR                                                            
NLS_NCHAR_CONV_EXCP            FALSE                                                           

17 Zeilen ausgewählt. 


PORT_STRING                                                 
------------------------------------------------------------
x86_64/Linux 2.4.xx

Information about client software
I use the SQLDeveloper with utPLSQL plugin in version 1.4.0

To Reproduce
My unittest packages all look similar to this:

create or replace PACKAGE test_pkg IS

   /* generated by utPLSQL for SQL Developer on 2020-03-10 08:57:25 */

   --%suite(test_suite)
   --%suitepath(com.my.company.app)

   --%test(test method)
   PROCEDURE test_method;

END test_pkg;

Expected behavior
All UnitTest packages should be excluded

Activity

  1. jgebal commented on Aug 2, 2022

    @jgebal
    jgebal
    on Aug 2, 2022
    Member
    More actions

    Hello @wolframhaussig

    I'm afraid I cannot fully understand and reproduce your problem.
    Can you say in simple words what is it that you expect / don't expect to get in coverage report vs. what you actually get/don't get?

  2. jgebal commented on Aug 2, 2022

    @jgebal
    jgebal
    on Aug 2, 2022
    Member
    More actions

    An example with some dummy packages would be really helpful

  3. wolframhaussig commented on Aug 3, 2022

    @wolframhaussig
    wolframhaussig
    on Aug 3, 2022
    Author
    More actions

    I am sorry if my description was confusing. Here is a simple example:

    create or replace PACKAGE pkg IS
        FUNCTION hello RETURN VARCHAR2;
    END pkg;
    /
    create or replace PACKAGE BODY pkg IS
        FUNCTION hello RETURN VARCHAR2 AS
        BEGIN
            RETURN 'Hello World!';
        END hello;
    END pkg;
    /
    create or replace PACKAGE test_pkg IS
    
       /* generated by utPLSQL for SQL Developer on 2020-03-10 08:57:25 */
    
       --%suite(test_suite)
       --%suitepath(com.my.company.app)
    
       --%test(test method)
       PROCEDURE test_method;
    
    END test_pkg;
    /
    create or replace PACKAGE BODY test_pkg IS
    
       /* generated by utPLSQL for SQL Developer on 2020-03-10 08:57:25 */
    
       --%suite(test_suite)
       --%suitepath(com.my.company.app)
    
       --%test(test method)
       PROCEDURE test_method AS
       BEGIN
        ut.expect(pkg.hello).to_equal('Hello World!');
       END;
    
    END test_pkg;

    This is just a simple hello world package with a unit test. There is just one test which is successful:
    image

    When running the code coverage I would expect the pkg package to be listed but not the test_pkg as this is just the unittest. But in reality I see both:
    image

    Am I doing something wrong?

  4. jgebal commented on Aug 15, 2022

    @jgebal
    jgebal
    on Aug 15, 2022
    Member
    More actions

    Hi @wolframhaussig
    Thank you for providing details of this issue.
    It looks like a regression error introduced in version 3.1.11 with removal of this line of code
    I checked a bit deeper and it seems like a line responsible for that functionality was disabled by me for some reason while implementing the feature.

    I'll investigate a bit further and see if it can be easily fixed by enabling this line.
    Definitely we miss a test to cover that functionality.

  5. jgebal
    self-assigned this
    on Aug 18, 2022
  6. jgebal
    added
    bug
    on Aug 18, 2022
  7. jgebal
    added this to the 3.1.13 milestone on Aug 18, 2022
  8. jgebal
    closed this as completedin #1226on Oct 17, 2022
  9. wolframhaussig commented on Dec 7, 2022

    @wolframhaussig
    wolframhaussig
    on Dec 7, 2022
    Author
    More actions

    @jgebal Sorry to resurrect this: Is there a release planned in the near future? I do not want to deploy a snapshot version on all of our databases so I would be glad if this would be released sometime.

  10. jgebal commented on Dec 7, 2022

    @jgebal
    jgebal
    on Dec 7, 2022
    Member
    More actions

    Hi @wolframhaussig
    I'm in the process of moving houses now so it's quite difficult to promise a date.
    I will aim to do the release over the weekend.

    Reacted by wolframhaussig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jgebal
    jgebal

Labels

bug

Type

No type

Projects

No projects

    Milestone

    • v3.1.13

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.