Questions tagged [utplsql]

Use this tag for questions relating to writing PL/SQL unit tests using the utPLSQL framework.

utPLSQL is a PL/SQL implementation of the venerable JUnit unit testing framework. It was originally written by Steven Feuerstein. The current version 3 is actively developed and maintained by a team of passionate developers. Find it here

21 questions
3
votes
0 answers

Oracle How to Chained Method Invocation PL/SQL

Using PL/SQL, how does one chain two method calls in the same statement without assigning an output to some variable in the calling scope? I first saw this technique in utPLSQL framework. begin ut.expect(6/2).to_equal(3); end; / This db<>fiddle…
Alex Bartsmon
  • 471
  • 4
  • 9
2
votes
1 answer

Installation process of utPLSQL

I am trying to setup utPLSQL for writing a unit test for PLSQL project. I am running into error while installing. I am not getting how to install it. Could anyone give a step by step procedure to install utPLSQL ? Thanks
Priyanka
  • 67
  • 6
1
vote
2 answers

Installing utPLSQL in Oracle Cloud

I am developing an APEX application on Oracle Cloud. Since I'm creating some functions and procedures I want to use utPLSQL to test these functions or procedures. If I follow the instructions of the installation for utPLSQL it says u need to…
HotFix
  • 157
  • 1
  • 11
1
vote
0 answers

How to refer tests to source/test files in utPLSQL?

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…
Sometowngeek
  • 597
  • 1
  • 6
  • 27
1
vote
2 answers

Attempting to install utPLSQL 3.1.10

I have downloaded utPLSQL.zip from github, unzipped the archive, opened the user guide bundled with the zip, and have started following along with the manual installation process. I'm using Oracle 18c XE, SQL Developer 20.2, and utPLSQL 3.1.10. I'm…
user1262958
1
vote
1 answer

dot notation in utplsql advanced data comparison

I've come across the below code snippet in utPLSQL website. procedure test_cur_skip_columns_eq is l_expected sys_refcursor; l_actual sys_refcursor; begin open l_expected for select 'text' ignore_me, d.* from user_tables d; open l_actual …
Krishy
  • 23
  • 1
  • 5
1
vote
2 answers

utPLSQL - Passing argument(l_message) into a procedure. Not passing the value.

I have a procedure which insert values into a table. CREATE OR REPLACE PROCEDURE proc_test_status_table( p_test_description IN VARCHAR2, p_test_status IN varchar2) AS l_sql…
Success Shrestha
  • 433
  • 1
  • 4
  • 19
1
vote
1 answer

utplsql checking column value comparision

I am new to UTPLSQL and i installed 3.04 version i checking column value ut.expect( o_ename ).to_equal('Ford'); o_ename will contain Ford. but when i executed test case test is failing saying that testename Actual: 'FORD' (varchar2) was…
1
vote
2 answers

Is there a equivalent utassert.eqtable (Available in utplsql version 2.X) in utplsql version 3.3?

After going through the documentations of Utplsql 3.0.2 , I couldn't find any references the assertion api as available in the older versions. Please let me know whether is there a equivalent assertion like utassert.eqtable available in newer …
1
vote
1 answer

How to cleanup the utplsql testpackages?

I wrote a few utPL/SQL Test on a PL/SQL Package, put them into a maven project and let them execute by jenkins. I wonder if there is a way to get rid of the test packages created in the database? It feels a bit weird that the test artefacts stay in…
Matthias Baumgart
  • 905
  • 1
  • 9
  • 22
0
votes
1 answer

Is it possible to compare a set of DB tables before and after running a utplsql procedures?

Is it possible to compare a set of DB tables before and after running a utplsql to see what's changed. I have a couple of utplsql test packages, ut_package1 and ut_package2. ut_plackage1 was running fine for quite sometime, and started seeing some…
Ram S
  • 25
  • 4
0
votes
0 answers

Is there a utPLSQL way to mock dependencies like in other unit testing frameworks?

In tSQLt, you can isolate dependencies for unit testing using procedures like FakeTable to create a dummy version of whatever your test subject depends on, that contains only data you specify. This is just like using Justmock or Moq in .NET unit…
JAF
  • 385
  • 1
  • 2
  • 12
0
votes
1 answer

Get Code Coverage from utPLSQL within Azure DevOps Pipeline?

I'm using utPLSQL 3.1.12.3589 on an Oracle 19c database. The business logic to be tested is deployed in schema BUSINESS_LOGIC, the unit tests are deployed in schema UNIT_TESTS. When I collect the code coverage within an Azure DevOps pipeline it…
Markus L
  • 932
  • 2
  • 20
  • 38
0
votes
1 answer

What is the right PL/SQL for updating rows without a need to reinsert it?

I new at using PL/SQL and I want the following: I have this table on Oracle SQLcl create table Child ( id varchar not null, name varchar not null, gender varchar not null, YearOfBirth number(4) not null, YearsOfAge number(4) null, CONSTRAINT Pk…
Aki
  • 33
  • 6
0
votes
1 answer

Oracle apex application to show utplsql test results

How can we create a report for showing the test result output of utplsql testing. The output of utplsql appears on screen when we run ut.run('package_name'). How can we store it somewhere and display it in report format in apex application .
PTK
  • 307
  • 4
  • 19
1
2