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 — Missing statistics when intergrating Cobertura output to TFS run · Issue #1107 · utPLSQL/utPLSQL

Missing statistics when intergrating Cobertura output to TFS run #1107

New issue
Copy link
New issue
Copy link
Closed
#1137
Closed
Missing statistics when intergrating Cobertura output to TFS run#1107
#1137
Copy link

Description

@TobiasDo1
TobiasDo1
opened on Nov 2, 2020
Issue body actions

Describe the bug
Integration of Cobertura output xml to TFS pipeline run does show correct coverage results on summary, but not any detailed statistics, when navigating into coverage details page.
It does show selected packages from coverage run, but all values equal zero.

image

image

Provide version info
Information about utPLSQL and Database version,

set serveroutput on
declare
  l_version varchar2(255);
  l_compatibility varchar2(255);
begin
  dbms_utility.db_version( l_version, l_compatibility );
  dbms_output.put_line( l_version );
  dbms_output.put_line( l_compatibility );
end;
/
select substr(ut.version(),1,60) as ut_version from dual;
select * from v$version;
select * from nls_session_parameters;
select substr(dbms_utility.port_string,1,60) as port_string from dual;

DB_Version:
19.0.0.0.0
19.7.0

UT_Version:
v3.1.10.3349
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-Mon-RRRR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
IBMPC/WIN_NT64-9.1.0

Information about client software
XML generated via SQLPlus console with:

SET LINESIZE 1000
SET PAGESIZE 0
SET FEEDBACK OFF
SET serveroutput ON SIZE unlimited
SET TRIMSPOOL ON
CONNECT xx/yy@zz
spool test_sample.xml
EXEC ut.run(ut_coverage_cobertura_reporter(), a_include_objects=>ut_varchar2_list('PACKAGE1','PACKAGE12'));
spool OFF

To Reproduce
Steps to reproduce the behavior:
1.) Generate coverage xml file with ut_coverage_cobertura_reporter
2.) Integrate to TFS piepline with YAML like that:

- task: PublishCodeCoverageResults@1
  displayName: 'Publish Code Coverage results'
  inputs:
    codeCoverageTool: Cobertura
    summaryFileLocation: '$(build.sourcesDirectory)\test_sample.xml'

3.) Check summary and coverage details page

Expected behavior
Detailed information should be also available on the detailed coverage information page

Additional context
Uploaded test_sample.xml for reference (I had to rename it to txt to upload it here).

test_sample.txt

Activity

  1. TobiasDo1 commented on Nov 2, 2020

    @TobiasDo1
    TobiasDo1
    on Nov 2, 2020
    Author
    More actions

    I manually added the classes tag around every class entry and this helped to show some more details:
    image

    When navigating into specific package, there is no relationship to code lines. I assume that I will have to somehow link this here.
    image

  2. pesse commented on Nov 12, 2020

    @pesse
    pesse
    on Nov 12, 2020
    Member
    More actions

    Thanks for reporting.
    I assume it's a bug in the reporter.
    I have planned to do some work on the reporters during the next couple of weeks and will look into it.
    If you could investigate the raw files for the possible issues rather than the visual representation inside TFS, that would be helpful

  3. pesse
    added
    reporter
    on Nov 12, 2020
  4. lwasylow commented on Apr 28, 2021

    @lwasylow
    lwasylow
    on Apr 28, 2021
    Member
    More actions

    Hi David
    Would you be able to mockup a sample xml of the format expected or point to some format reference? Issue with reporters for each CI is usually finding a format to match with and I don't have an access to azure devops anymore.
    Kind regards Łukasz

  5. OsBlaineOra commented on May 20, 2021

    @OsBlaineOra
    OsBlaineOra
    on May 20, 2021
    Contributor
    More actions

    Same problem in GitLab

    Broken XML Output

    <?xml version="1.0" encoding="US-ASCII"?>
    <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
    <coverage line-rate="0" branch-rate="0.0" lines-covered="6" lines-valid="7" branches-covered="0" branches-valid="0" complexity="0" version="1" timestamp="1621528201.000000000000000000000000000002">
    <sources>
    <source>utplsql/betwnstr.fnc</source>
    <source>utplsql/utils.pkb</source>
    </sources>
    <packages>
    <package name="BETWNSTR" line-rate="0.0" branch-rate="0.0" complexity="0.0">
    <class name="BETWNSTR" filename="utplsql/betwnstr.fnc" line-rate="0.0" branch-rate="0.0" complexity="0.0">
    <lines>
    <line number="6" hits="1" branch="false"/>
    <line number="9" hits="1" branch="false"/>
    <line number="10" hits="0" branch="false"/>
    <line number="12" hits="1" branch="false"/>
    </lines>
    </class>
    </package>
    <package name="UTILS" line-rate="0.0" branch-rate="0.0" complexity="0.0">
    <class name="UTILS" filename="utplsql/utils.pkb" line-rate="0.0" branch-rate="0.0" complexity="0.0">
    <lines>
    <line number="12" hits="1" branch="false"/>
    <line number="16" hits="1" branch="false"/>
    <line number="19" hits="1" branch="false"/>
    </lines>
    </class>
    </package>
    </packages>
    </coverage>
    

    Manually adding tags makes GitLab pickup the line coverage.

    <?xml version="1.0" encoding="US-ASCII"?>
    <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
    <coverage line-rate="0" branch-rate="0.0" lines-covered="6" lines-valid="7" branches-covered="0" branches-valid="0" complexity="0" version="1" timestamp="1621528201.000000000000000000000000000002">
    <sources>
    <source>utplsql/betwnstr.fnc</source>
    <source>utplsql/utils.pkb</source>
    </sources>
    <packages>
    <package name="BETWNSTR" line-rate="0.0" branch-rate="0.0" complexity="0.0">
    <classes>
    <class name="BETWNSTR" filename="utplsql/betwnstr.fnc" line-rate="0.0" branch-rate="0.0" complexity="0.0">
    <lines>
    <line number="6" hits="1" branch="false"/>
    <line number="9" hits="1" branch="false"/>
    <line number="10" hits="0" branch="false"/>
    <line number="12" hits="1" branch="false"/>
    </lines>
    </class>
    </classes>
    </package>
    <package name="UTILS" line-rate="0.0" branch-rate="0.0" complexity="0.0">
    <classes>
    <class name="UTILS" filename="utplsql/utils.pkb" line-rate="0.0" branch-rate="0.0" complexity="0.0">
    <lines>
    <line number="12" hits="1" branch="false"/>
    <line number="16" hits="1" branch="false"/>
    <line number="19" hits="1" branch="false"/>
    </lines>
    </class>
    </classes>
    </package>
    </packages>
    </coverage>
    

    This doesn't fix the "0.0" issue in the properties.

  6. OsBlaineOra
    added a commit that references this issue on May 20, 2021

    Added missing <classes> tag

    ae50802
  7. jgebal
    linked a pull request that will close this issueAdded missing <classes> tag #1137on May 20, 2021
  8. jgebal
    closed this as completedin #1137on May 20, 2021
  9. OsBlaineOra
    added a commit that references this issue on Jun 1, 2021

    Replaced hard coded 0 in total test coverage

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — 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.