1

I could use a little hand with utPLSQL.

I am trying to produce the test results so that Sonar would pick it up and scan them. so far, Sonar is picking up the report file, but the test executions are ignored because they are not referencing to the appropriate source files.

I am trying to make a reference to the source and test files when running ut.run(ut_sonar_test_reporter()); and our Jenkins does not have utPLSQL-cli installed. Short version: They said they will not install it.

To get a result for a single test, I tried the following:

spool sonar_results.xml;

exec ut.run('test_get_something');
exec ut.run(ut_sonar_test_reporter(), a_source_file_mapping => ut_file_mappings(ut_file_mapping(file_name => 'this_dir/get_something.fnc', object_owner=> 'GET_SOMETHING_OWNER', object_name=> 'GET_SOMETHING', object_type=>'FUNCTION'));

spool off;

And got the following error message:

 Error starting at line : 4 in command -
 BEGIN ut.run(ut_sonar_test_reporter(), a_source_file_mapping => ut_file_mappings(ut_file_mapping(file_name => 'this_dir/get_something.fnc', object_owner=> 'GET_SOMETHING_OWNER', object_name=> 'GET_SOMETHING', object_type=>'FUNCTION'));
 
 Error report -
 ORA-06550: line 1, column 219:
 PLS-00306: wrong number or types of arguments to call to 'RUN'
 ORA-06550: line 1, column 219
 PL/SQL: Statement ignored

utPLSQL's documentation doesn't provide anything about referencing parameters like a_source_file_mapping or a_test_file_mapping.

I am a little stumped.

Sometowngeek
  • 597
  • 1
  • 6
  • 27
  • Take a look at this: [link](https://github.com/utPLSQL/utPLSQL-cli/issues/184#issuecomment-649139965) – Thomas Kirchhoff Jan 19 '21 at 07:24
  • @ThomasKirchhoff I checked the link out and tried to replicate it in my database, testing my function and got bupkis... I even opened an issue. I posted an update this morning. [Issue #1115](https://github.com/utPLSQL/utPLSQL/issues/1115). I think I might be a little confused with building the source file mapping. – Sometowngeek Feb 08 '21 at 14:14

0 Answers0