Repository navigation
Description
Describe the bug
Under Oracle EE 18.5.0.0.0 tests with %beforeeach or %aftereach fails with ORA-20204.
ORA-20204: Suite test <before/after each procedure> does not exist
But both exist!
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;
/
==>
PL/SQL block executed
18.0.0.0.0
18.0.0
-> this query is wrong for 18c upwards, the sqlplus header shows us:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0
select substr(ut.version(),1,60) as ut_version from dual;
v3.1.6.2735
select * from v$version;
==>
BANNER BANNER_FULL BANNER_LEGACY CON_ID
-------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------- --------------------------------------------
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0 Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production 0
select * from nls_session_parameters;
==>
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.RRRR
NLS_DATE_LANGUAGE GERMAN
NLS_SORT GERMAN
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD.MM.RR HH24:MI:SSXFF
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
select substr(dbms_utility.port_string,1,60) as port_string from dual;
==>
PORT_STRING
------------------------------------------------------------------
x86_64/Linux 2.4.xx
Information about client software
What client was used to run utPLSQL tests? Was it from TOAD, SQLDeveloper, SQLPlus, PLSQL Developer etc...
To Reproduce
Steps to reproduce the behavior:
- In SQL Developer with utPLSQL extension create the provided test package in Oracle EE 18.5.0.0.0 and open the package
- Right Click open the context menu in editor and click "Run utPLSQL Test"
- See error in te script output:
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 680
ORA-06512: at "UT3.UT_RUNNER", line 150
ORA-20204: Suite test s205031.test_betwnstr.setup does not exist
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 680
Error starting at line : 2 in command -
BEGIN ut.run('S205031.test_betwnstr.setup'); END;
Error report -
ORA-20204: Suite test s205031.test_betwnstr.setup does not exist
ORA-06512: at "UT3.UT_RUNNER", line 163
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 680
ORA-06512: at "UT3.UT_RUNNER", line 150
ORA-06512: at "UT3.UT", line 126
ORA-06512: at "UT3.UT", line 427
ORA-06512: at "UT3.UT", line 538
ORA-06512: at line 1
Expected behavior
The test should find and run the beforeEach and aftereach procedures. It is possible, that other annotations run into this error, so you should check all.
Example code
Will attach a modified test_betwnstr package to reproduce this issue.
Additional context
Add any other context about the problem here.
Activity
tkleiber commentedon Mar 29, 2019
Here is the testcase:
test_betwnstr.zip
jgebal commentedon Mar 29, 2019
Did this start to occur after utPLSQL upgrade of DB upgrade?
Did you see similar issues with previous version of utPLSQL v3.1.3 ?
Can you share the results of following.
I'll investigate the changes done between those two releases.
tkleiber commentedon Mar 29, 2019
==>
CACHE_ID ANNOTATION_POSITION ANNOTATION_NAME ANNOTATION_TEXT SUBOBJECT_NAME
suite_cache.zip
debug_log.zip
Have upgraded to v3.1.6 on Oracle EE 11.2.0.4, there the error does not happen. So this seems to be related to the database version.
jgebal commentedon Mar 29, 2019
Thanks @tkleiber for the inputs.
Sute
suite_cache.xmlis empty - can you re-upload or are the results of the query actually empty?tkleiber commentedon Mar 29, 2019
Seems I found another bug in quest sql navigator, saving xml to file does not work there, now I have copied this manually:
suite_cache.zip
jgebal commentedon Mar 29, 2019
Ah...
I think it's not utPLSQL bug, but SQLDeveloper or SQLDeveloper-plugin bug.
Just noticed it now.
In your command line you have:
The problem is:
BEGIN ut.run('S205031.test_betwnstr.setup'); END;You are trying to call the
setupprocedure as a test. PathS205031.test_betwnstr.setupis not a valid test path.I believe the error message could be better but I do not have a good idea how to make it more intuitive. Any cuggestions welcome
Do you see the same issue if you run the same thing but with one of the below command?
BEGIN ut.run('S205031.test_betwnstr'); END;BEGIN ut.run('S205031.normal_case'); END;BEGIN ut.run('S205031'); END;I'm not sure if there is a change in behavior of the plugin (selecting different path/node) when invoked.
If you're doing exactly the same thing (clicks in UI) on both DB versions and see different behavior - it's probably SQLDeveloper plugin that needs to be improved.
tkleiber commentedon Mar 29, 2019
Ok - it seems, that the plugin generate this call from the editor if I'm between the first line (where the package name is) and between the procedure setup defintion (line 8). Then it seems to find the next procedure definition and use it.
I think it should lonly generate a procedure test, when I'm on a procedure with a test anotation and else the package test.
Sorry for being so blind! But I mixed this up with a problem which I have with another user in this database. But I will create another issue therefore.
jgebal commentedon Mar 29, 2019
Cheers Torsten
Can yo create it under SQLDeveloper-plugin project?
https://github.com/utPLSQL/utPLSQL-SQLDeveloper
Otherwise I hope
v3.1.6works fine for you.Also, would you be interested in framework-startup time improvements?
If so, let me know, there is a feature branch that is to be tested by one of developers that are using
Oracle EBS, where they suffer from long startup time for the framework.Thanks
Jacek
tkleiber commentedon Mar 29, 2019
Maybe you can give me quick hint? Does a user need a specific grant or access to use utPLSQL?
Running the standard test_betwnstr there fails with:
Call params for test are not valid: package does not exist or is invalid: XXXXXX.TEST_BETWNSTRAnd this happens for all 1400 tests.