Skip to content

Issue In XUnit Reporter GetPath #547

Description

@lwasylow

I believe there is an issue in getpath expression in ut_xunit_reporter.
It uses a substring which can result in negative positive.
E.g. Package is named "ut_gen_pk_id_api" and annotation for suitepath is alltests

CREATE OR REPLACE PACKAGE ut_test.ut_generate_pk_id_api IS

--%suitepath(alltests)
--%suite(generate_primary_key)
--%displayname(Generate PK Function Suite)

--%test(ut_generate_pk_id)
--%displayname(Generate PK Function Test)
PROCEDURE ut_generate_pk_id;

END ut_generate_pk_id_apii;
/

When running that it reports a classname in xunit as : 'alltest' rather than 'alltests.ut_gen_pk_id_api'

Would not be better to replace

return substr(a_path_with_name, 1, instr(a_path_with_name, '.' || a_name) - 1);
with
substr(a_path_with_name, 1, regexp_instr(a_path_with_name, '.' || a_name||'$') - 1)

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions