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

Getting Started TDD example unexpected result #1281

Open
jpmartins opened this issue Aug 12, 2024 · 2 comments
Open

Getting Started TDD example unexpected result #1281

jpmartins opened this issue Aug 12, 2024 · 2 comments

Comments

@jpmartins
Copy link

Describe the bug
TDD logic not working as it is expected in the example of the getting started, it did not fail on empty package body.

Provide version info
Information about utPLSQL and Database version,

UT_VERSION

v3.1.14.4197

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Oracle Database 19c Enterprise Edition Release

PARAMETER VALUE


NLS_LANGUAGE ENGLISH
NLS_TERRITORY UNITED KINGDOM
NLS_CURRENCY £
NLS_ISO_CURRENCY UNITED KINGDOM
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE ENGLISH
NLS_SORT BINARY
NLS_TIME_FORMAT HH24.MI.SSXFF
NLS_TIMESTAMP_FORMAT DD-MON-RR HH24.MI.SSXFF

PARAMETER VALUE


NLS_TIME_TZ_FORMAT HH24.MI.SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH24.MI.SSXFF TZR
NLS_DUAL_CURRENCY €
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE

17 rows selected.

PORT_STRING

Linuxaarch64/Linux-2.4.x

Information about client software
Oracle SQL Developer Version 23.1.1.345

To Reproduce
Steps to reproduce the behavior:

  1. Create empty package test suite:

create or replace package test_betwnstr as

--%suite(Between string function)

--%test(Returns substring from start position to end position)
procedure basic_usage;

end;
/

  1. Run it with begin ut.run('test_betwnstr'); end;
  2. Result is not the expecter one:

Between string function

Finished in .000795 seconds
0 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)

PL/SQL procedure successfully completed.

Expected behavior

Test results:

Between string function
Returns substring from start position to end position (FAILED - 1)

Failures:

  1. basic_usage
    ORA-04067: not executed, package body "UT3_USER.TEST_BETWNSTR" does not exist
    ORA-06508: PL/SQL: could not find program unit being called: "UT3_USER.TEST_BETWNSTR"
    ORA-06512: at line 6
    Finished in .509673 seconds
    1 tests, 0 failed, 1 errored, 0 disabled, 0 warning(s)

https://www.utplsql.org/utPLSQL/develop/userguide/getting-started.html#create-test-package

@jpmartins
Copy link
Author

jpmartins commented Aug 12, 2024

Strangest thing, apparently the test suite got created, but not the test.

select * from table(ut_runner.get_suites_info()) where item_type = 'UT_SUITE';

select * from table(ut_runner.get_suites_info()) where item_type = 'UT_TEST';

This is happening on on a fresh install using:
@install_headless_with_trigger.sql

@jpmartins
Copy link
Author

jpmartins commented Aug 12, 2024

Not sure what happened, I forced stopped looking at this and stop the oracle container and when to work on another topic. When i started it back, the basic_usage test was there, added the next test of the guide zero_start_position, and it is not created... something with synchronisation of packages and tests of utPLSQL... not sure what.

The tests get updated when I run ... @uninstall.sql followed by @install_headless_with_trigger.sql...

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

No branches or pull requests

1 participant