Resources
Do you know about videos, articles, blogs or code examples that are missing here? Please let us know!
Framework
Overview
- Unit Testing Oracle PL/SQL (by Jacek Gebal)
Comprehensive webinar about utPLSQL by Jacek Gebal. The definitive guide to why and how to test PL/SQL with utPLSQL - utPLSQL 3.0 - How to have your cake and eat it (by Mike Smithers)
Complete introduction to utPLSQL 3.0, covering installation, comprehensive example application, transaction challenges and even code coverage - Strongholds of Confidence: Self-Testing your Database (by Samuel Nitsche)
Plea to start creating meaningful, automated self-tests and why. Finishes with a concrete utPLSQL example - Test Driven Development in PLSQL with utPLSQL v3 – intro (by Jacek Gebal)
Addresses some major struggles of developers who start with unit-testing and also gives a brief intro into Test-Driven-Development
Structuring Tests
- utPLSQL’s Suite Hierarchy in action (by Samuel Nitsche)
Example of the%suitepath
annotation and utPLSQL hierarchies - Narrate Star Wars Movies with utPLSQL annotations (by Samuel Nitsche)
Example how to use the different annotations that allow to structure tests (%before
,%after
,%context
) - Testing the Deathstar security with utPLSQL contexts (by Samuel Nitsche)
Example how to use the%context
annotation
Cursor Comparison
- What is the equivalent of utassert eqtable / eqquery in utPLSQL v3 (by Jacek Gebal)
Comparison between utPLSQL v2’sutassert.eqtable
and v3’sut.expect(sys_refcursor).to_equal(sys_refcursor)
approach. - Unit-Tests for Primary/Secondary Lookup with Cursor Comparison (by Samuel Nitsche)
Example how to use cursor comparison withselect from dual
expectations - utPLSQL Cursor Comparison with user-defined Types (by Samuel Nitsche)
Example how to use cursor comparison with expectations created via user-defined types - Test updatable views with utPLSQL Cursors (by Samuel Nitsche)
Example how to easily test the updatability of a view with cursor comparison
Code Talks
- 2017 CodeTalk Series: Unit Testing PL SQL Code in the Real World
- 2018 CodeTalk Series: Practical Advice for Taking Your PL SQL Testing to the Next Level
Tools
SQLDeveloper Plugin
- Running utPLSQL Tests in SQL Developer (by Philipp Salvisberg)
Detailed explanation how to install and use the utPLSQL-Plugin for SQLDeveloper - GitHub page