Toad World® Forums

14.0.0.200 Unit test result are messed up

Hello,

after performing all tests of a suite, the test results do not seem to be assigned correctly.
The hierarchy is displayed correctly in the Unit Test Manager:


But you can already see that the results make no sense.

The report for these two sub-suites looks as follows:


The package ut_country and its tests is located below the sub-suite country_name although it belongs to the sub-suite country.

Is this a Toad issue or is the unit test framework confused somehow? I'm using version v3.1.9.3270.

Regards
Dirk

I've tried a few things and cannot reproduce, but I can't tell exactly how you have your suites constructed based on your screenshots. Can you post a skeleton matching your suite/sub-suite design that I can compile here? I don't need your actual test code, just a skeleton of the package(s), test procedures and annotations within.

There are two ways to achieve sub-suite type of logic. You can use two suites where each share a common suitepath or you can have a single suite and use --%context annotations within to make sub-suites. I've tried both and in both cases the text report matches the layout of my suites.

The plain text report comes directly from utPLSQL so anything in there would be due to the framework. Your first screenshot shows a failure at the country_name level, but the test beneath has passed. Do you have other tests beneath that level that have failed? If not, click the failed country_name node and look at the bottom of the Unit Test Manager window for any clues. Has the framework reported an error in that suite possibly due to malformed annotations?

Hello,

Maybe I did not understand the concept of the Suitepath.
Currently the package ut_country looks like this:

CREATE OR REPLACE PACKAGE ut_country
IS
   -- %suite
   -- %suitepath(abc.country)

   -- %test(localized_name)
   PROCEDURE ut_test_01;
END ut_country;
/

while the package ut_country_name is:

CREATE OR REPLACE PACKAGE ut_country_name
IS
   -- %suite
   -- %suitepath(abc.country_name)

   -- %test
   PROCEDURE ut_test_country_name;
END ut_country_name;
/

All packages were created with utPLSQL V2 and then migrated to version 3.
Since almost every package has its own setup routine (These two are exceptions) that inserts test data into the database, I chose different suite paths.

BR
Dirk

Suitepath can be viewed like folder structure and can be used in any way that fits your needs, best. If I had code/projects for items like payroll, sales, and employee records I might use the following suitepaths...

com.quest.sales
com.quest.payroll
com.quest.employees

...and group my test suites beneath as appropriate.

image

I've created suites based on your provided sample and see the following. I'd look into that red failure that is shown for your country_name path in your original post. I think there might be something problematic in that suite. Perhaps the setup procedure failed to run successfully or there is an annotation problem.

Hi,

Thanks for testing this.
In my case the result is still confused:

I've still installed utPLSQL V2 and the migration tool (https://github.com/utPLSQL/utPLSQL-v2-v3-migration), which allows me to have V2 calls still working.
However, I have completely changed the two packages tested here to V3.

Dirk

I have now discovered that the error only occurs when NLS_SORT is set to GERMAN, for example. (This is my default setting).
After an ALTER SESSION SET nls_sort = binary; the test results are displayed correctly.

I have opened an issue on the utPLSQL github page: https://github.com/utPLSQL/utPLSQL/issues/1060

BR
Dirk

Nice find, thanks for logging that.