GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - utPLSQL/utPLSQL at feature/code_based_access_control

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

3,871 Commits
3,871 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
development
development
 
 
docs
docs
 
 
examples
examples
 
 
source
source
 
 
test
test
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
BUILD_NO
BUILD_NO
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
SPONSORS.md
SPONSORS.md
 
 
VERSION
VERSION
 
 
mkdocs.yml
mkdocs.yml
 
 
mkdocs_offline.yml
mkdocs_offline.yml
 
 
readme.md
readme.md
 
 
sonar-project.properties
sonar-project.properties
 
 

Repository files navigation

utPLSQL v3 | Testing Framework for PL/SQL

latest-release license GitHub Discussions X Bluesky LinkedIn Sponsor build QualityGate Coverage

utPLSQL is a unit testing framework for Oracle PL/SQL and SQL, following industry standards and best practices of modern testing frameworks like JUnit and RSpec.

Key Features

  • Multiple ways to compare data with matchers
  • Native comparison of complex types (objects, collections, cursors)
  • In-depth and consistent reporting of failures and errors
  • Tests identified and configured by annotations
  • Hierarchies of test suites configured with annotations
  • Automatic (configurable) transaction control
  • Built-in coverage reporting
  • Integration with SonarQube, Jenkins and TeamCity via reporters
  • Plugin architecture for reporters and matchers
  • Flexible and simple test invocation
  • Multi-format reporting from the command line client

Requirements

  • Oracle Database 19c with Release Update 19.20 or later, or any newer version (we are testing on 19.20, 21 XE and 23 free )

Installation

Published releases are available for download on the utPLSQL GitHub Releases page.

To install utPLSQL into a new database schema and grant it to public, execute the script install_headless.sql. This creates a new user UT3, grants all required privileges, and creates PUBLIC synonyms.

For all install options see the Install Guide.

Quick Start

1. Write a test package

Annotate a package specification to define a test suite and its tests, then implement each test procedure in the package body:

create or replace package test_between_string as

  -- %suite(Between string function)

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

  -- %test(Returns null for null input string value)
  procedure null_string;
end;
/

create or replace package body test_between_string as

  procedure normal_case is
  begin
    ut.expect( betwnstr( '1234567', 2, 5 ) ).to_( equal('2345') );
  end;

  procedure null_string is
  begin
    ut.expect( betwnstr( null, 2, 5 ) ).to_( be_null );
  end;

end;
/

2. Run your tests

exec ut.run();

3. See the results

Between string function
  Returns substring from start position to end position
  Returns null for null input string value

Finished in .036027 seconds
2 tests, 0 failures

For complete working examples see examples/.

Running Tests

From any Oracle-compatible IDE (SQL Developer, TOAD, PL/SQL Developer):

begin
  ut.run();
end;
/
exec ut.run();
select * from table(ut.run());

These commands run all suites in the current schema and report test results to DBMS_OUTPUT or as a result set.

Command Line Client

utPLSQL-cli lets you run tests without an Oracle Client or IDE. It provides:

  • Real-time test reporting
  • Simultaneous output of multiple report formats into different files
  • Source files and test files mapping for coverage reports

Download the latest release and see the CLI readme for details.

Documentation

Full documentation is published at https://www.utplsql.org/utPLSQL/.

Cheat-sheets are available for quick reference.

See the Changelog for the full version history.

Migrating from legacy utPLSQL v2? See the version 2 to version 3 comparison.

Contributing

We welcome contributions of all kinds. Please read the contributing guide and the code of conduct before getting started.

GitHub Discussions is the place to ask questions and connect with the team.

The list of authors and significant contributors is available on the About page. For a full list of contributors, see contributors on GitHub.

Sponsorship

utPLSQL is free and open source (Apache 2.0). Sponsorship funds development of new features and tools, maintaining compatibility with new Oracle versions and platforms, documentation. See Sponsorship for organization tiers, commercial support and individual sponsorship. All current and past sponsors are listed in SPONSORS.md.

License

utPLSQL is free and open source, licensed under the Apache 2.0 license.

Stewardship

utPLSQL is stewarded by utPLSQL Development Labs Ltd, which holds the utPLSQL name, branding and project assets, and manages sponsorships and funded development. Contributors retain copyright of their contributions, which are licensed under the Apache 2.0 license. See the announcement for details.

About

Testing Framework for PL/SQL

www.utplsql.org/

Topics

code-coveragedatabase-testingoracleoracle-databaseoracle-dbpl-sqlplsqltest-automationtest-driven-developmenttestingtesting-toolsunit-testingutplsql

Resources

Readme
License

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

624 stars

Watchers

57 watching

Forks

191 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.