SlideShare a Scribd company logo
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Unit	and	Regression	
TesBng	for	PL/SQL	
A	conversaBon	with	three	developers		
who	actually	do	this	
Steven	Feuerstein	
Oracle	Developer	Advocate	for	PL/SQL	
Oracle	CorporaBon	
	
Email:	steven.feuerstein@oracle.com	
TwiOer:	@sfonplsql	
Blog:	stevenfeuersteinonplsql.blogspot.com	
YouTube:	PracBcally	Perfect	PL/SQL
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Agenda	
	
Why	unit	test?	Why	regression	test?	
Using	Excel	as	a	test	harness	
utPLSQL	v3:	the	brave	new	world	
2
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
The	Unit	TesBng	Code	Talkers	
•  Jacek	Gabal		*	Pavel	Kaplya	*	Stefan	Poschenrieder	
3
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Code	Talker:	Jacek	Gabal	
•  Senior	So]ware	Engineer	at	Fidelity	Investments	Ireland	
•  Oracle	SQL	and	PLSQL	developer	since	1998	
•  CerBfied	Scrum	Master	
•  Lean,	Agile	and	TDD	infected	
•  Author	of	utPLSQL	v3	unit	tesBng	framework	
•  Contributor	to	ruby-plsql	and	ruby-plsql-spec	unit	tesBng	
framework	for	PLSQL
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Code	Talker:	Pavel	Kaplya	
•  BI	So]ware	Architect,	OCP	PL/SQL	Developer	
•  Diaso],	Russia	
•  Author	of	utPLSQL	v3	unit	tesBng	framework
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Code	Talker:	Stefan	Poschenrieder	
•  20	years	experience	with	Oracle	SQL	and	PL/SQL.	
•  Freelancer	with	focus	on	development	process	
opBmizaBon	and	emphasis	on	tesBng).	
•  "I	can	not	live	(i.e.,	code)	without	unit	tests."	
•  Last	success	story:	evangelized	a	scrum	team	of	10		
developers	to	unit-tesBng,	changing	the	status	of	the	
project	from	“red”	to	“green”.	
•  Now	supporBng	next	team	in	the	company.	
@utplsqlXL
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
WriBng	so]ware	is	fun.	
7
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Buggy	so]ware	is....	
embarrassing,	
expensive,	and	
someBmes	deadly.	
8
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Unfortunately,	tesBng	so]ware	
is	(hard)	work	and	boring.	
	
(of	course	some	people	like	it	a	lot!)	
9
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Uh-oh.	
10
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Why	Unit	Test?		
	
Clearer	thinking	about	requirements	(TDD).	
Find	bugs	early	(and	cheaply).	
Fewer	bugs	in	producBon.	
Make	changes	with	confidence.	
Forces	you	to	write	testable	code.	
Makes	you	feel	great	–	tesBng	as	a	game!	
11
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Why	(not)	Regression	Test?	
	
Avoid	undesirable	side-effects	and	"FDD."	
Test	more	frequently.	
Upgrade	more	easily.	
Reduce	maintenance	costs.	
Make	users	happy	and	sleep	more	easily.	
12
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Tools	for	Unit	TesBng	PL/SQL	
	
utPLSQL	
SQL	Developer	Unit	TesBng	
Code	Tester	for	Oracle	(commercial)	
PL/Unit	
dbUnit	
dbFit...	
	
13
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Stefan	and		
Using	utPLSQL	with	Excel	(!)	
14
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
PLSQL	/	ETL	Tool	
	
A	"UNIT"	in	BI	/	DWH	
SOURCETABLE	1	
TARGET-TABLE	
The	highest	complexity	in	ETL	is	in	the	T.	
SOURCETABLE	2	 SOURCETABLE	X
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Defining	tests	with	Excel	and	utplsql	
utPLSQL	is	a	very	cool	framework,	but	sBll	much	to	code	
	
it	must	be	very	easy	to	define	unit-tests	to	bring	a	developer	in	tesBng	mood	
	
In	Datawarehousing	a	„unit“	is	a	very	complex	thing	
	
Everybody	should	be	a	able	to	adapt	tests,	even	he	can	not	code,	but	understands	
the	business.	
	
I	always	defined	data	using	Excel.	(generate	Insert/statements,	use	sqlldr)	
I	always	get	data	from	other	people	inside	Excel.	
	
So	why	don‘t	use	Excel	for	unit-tesBng?
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Jacek:	utPLSQL	v3	Key	Features	
-	mulBple	ways	to	compare	data	with	matchers	
-	naBve	comparison	of	complex	types	(objects/collecBons/cursors)	
-	in-depth	and	consistent	reporBng	of	failures	and	errors	for	tests	
-	tests	idenBfied	and	configured	by	annotaBons	
-	hierarchies	of	test	suites	configured	with	annotaBons	
-	automaBc	(configurable)	transacBon	control	
-	Build-in	coverage	reporBng	
-	IntegraBon	with	SonarQube,	Coveralls,	Jenkins	and	Teamcity	with	
reporters	
-	plugin	architecture	for	reporters	and	matchers	
-	flexible	and	simple	test	invocaBon	
-	mulB-reporBng	from	test-run	from	command	line
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Pavel:	utPLSQL	v3	Demo	
Building	unit	tests	
ExecuBng	tests	
Code	coverage		
Different	reporBng	styles
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
ConBnuous	IntegraBon	/	ConBnuous	Delivery	
What	is	CI/CD?	
Why	should	I	care?	
Running	on	Teamcity	
Running	on	Travis	
Sonar	IntegraBon	
Coveralls
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Resources	for	Unit	TesBng	with	utPLSQL	
	-	documentaBon:	utplsql.github.io/utPLSQL/	
		-	releases:	github.com/utPLSQL/utPLSQL/releases	
		-	project	source:	github.com/utPLSQL/utPLSQL/	
		-	demo	project:	github.com/utPLSQL/utPLSQL-demo-project/	
		-	CI	for	demo	project	with	Travis	
		-	SonarQube	for	demo	project:	
sonarqube.com/dashboard?id=utPLSQL%3AutPLSQL-demo-project%3Adevelop	
		-	SonarQube	for	utPLSQL:	
sonarqube.com/dashboard?id=utPLSQL%3AutPLSQL%3Adevelop	
		-	Coveralls	for	utPLSQL:	coveralls.io/github/utPLSQL/utPLSQL	
	
		-	TwiOer:	#utPLSQL,	@utPLSQL,	@GebalJacek,	@Pazus
Copyright	©	2017,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Unit	TesBng	PL/SQL	
take	your	code	to	the	next	level	
	
frameworks	and	tools	gexng	more	powerful	
	
utplsql	v3	in	parBcular	offers	tremendous	promise	
	
	
21

More Related Content

What's hot (20)

PPTX
Oracle Unit Testing with utPLSQL
Brendan Furey
 
PDF
New availability features in oracle rac 12c release 2 anair ss
Anil Nair
 
PPTX
Power of the AWR Warehouse
Kellyn Pot'Vin-Gorman
 
PPTX
Turbocharge SQL Performance in PL/SQL with Bulk Processing
Steven Feuerstein
 
PDF
POUG2019 - Test your PL/SQL - your database will love you
Jacek Gebal
 
PPT
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
John Kanagaraj
 
PPTX
utPLSQL: Unit Testing for Oracle PL/SQL
Steven Feuerstein
 
PPTX
Extreme Replication - Performance Tuning Oracle GoldenGate
Bobby Curtis
 
PDF
A deep dive about VIP,HAIP, and SCAN
Riyaj Shamsudeen
 
PPTX
Oracle DBA
shivankuniversity
 
PPT
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
udaymoogala
 
PDF
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Markus Michalewicz
 
PDF
High Performance PL/SQL
Steven Feuerstein
 
PDF
ODA Backup Restore Utility & ODA Rescue Live Disk
Ruggero Citton
 
PDF
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair
 
PDF
Introduction to elasticsearch
hypto
 
PDF
Oracle LOB Internals and Performance Tuning
Tanel Poder
 
PDF
MySQL 8.0 EXPLAIN ANALYZE
Norvald Ryeng
 
PDF
GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)
オラクルエンジニア通信
 
PDF
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
John Beresniewicz
 
Oracle Unit Testing with utPLSQL
Brendan Furey
 
New availability features in oracle rac 12c release 2 anair ss
Anil Nair
 
Power of the AWR Warehouse
Kellyn Pot'Vin-Gorman
 
Turbocharge SQL Performance in PL/SQL with Bulk Processing
Steven Feuerstein
 
POUG2019 - Test your PL/SQL - your database will love you
Jacek Gebal
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
John Kanagaraj
 
utPLSQL: Unit Testing for Oracle PL/SQL
Steven Feuerstein
 
Extreme Replication - Performance Tuning Oracle GoldenGate
Bobby Curtis
 
A deep dive about VIP,HAIP, and SCAN
Riyaj Shamsudeen
 
Oracle DBA
shivankuniversity
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
udaymoogala
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Markus Michalewicz
 
High Performance PL/SQL
Steven Feuerstein
 
ODA Backup Restore Utility & ODA Rescue Live Disk
Ruggero Citton
 
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair
 
Introduction to elasticsearch
hypto
 
Oracle LOB Internals and Performance Tuning
Tanel Poder
 
MySQL 8.0 EXPLAIN ANALYZE
Norvald Ryeng
 
GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)
オラクルエンジニア通信
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
John Beresniewicz
 

Similar to Unit Testing Oracle PL/SQL Code: utPLSQL, Excel and More (20)

PDF
Impact Analysis with PL/Scope
Steven Feuerstein
 
PDF
PL/SQL Guilty Pleasures
Steven Feuerstein
 
PDF
All About PL/SQL Collections
Steven Feuerstein
 
PPTX
What's New in Oracle SQL Developer for 2018
Jeff Smith
 
PDF
Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4
asifanw
 
PDF
Speakers at Nov 2019 PL/SQL Office Hours session
Steven Feuerstein
 
PDF
Oracle Application Express and PL/SQL: a world-class combo
Steven Feuerstein
 
PDF
OLD APEX and PL/SQL
Steven Feuerstein
 
PPTX
OOW15 - Testing Oracle E-Business Suite Best Practices
vasuballa
 
PDF
Cloud Native Java:GraalVM
Taewan alvin Kim
 
PDF
Cloud Native 자바 플랫폼: Graalvm Overview
Oracle Korea
 
PPTX
Oracle SQL Developer Top 10 Tips & Tricks
Jeff Smith
 
PDF
The Future of Java and You
Heather VanCura
 
PDF
JSON and PL/SQL: A Match Made in Database
Steven Feuerstein
 
PDF
SMART4apex company presentation APEX world convention March 25 2014
Sergei Martens
 
PPTX
Open Closed Principle kata
Paul Blundell
 
PDF
D34010.pdf
RuchiNagar3
 
PPTX
What's New in Innoslate 4.4?
SarahCraig7
 
PDF
OOW16 - Testing Oracle E-Business Suite Best Practices [CON6713]
vasuballa
 
PPT
Les01
um_adeveloper
 
Impact Analysis with PL/Scope
Steven Feuerstein
 
PL/SQL Guilty Pleasures
Steven Feuerstein
 
All About PL/SQL Collections
Steven Feuerstein
 
What's New in Oracle SQL Developer for 2018
Jeff Smith
 
Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4
asifanw
 
Speakers at Nov 2019 PL/SQL Office Hours session
Steven Feuerstein
 
Oracle Application Express and PL/SQL: a world-class combo
Steven Feuerstein
 
OLD APEX and PL/SQL
Steven Feuerstein
 
OOW15 - Testing Oracle E-Business Suite Best Practices
vasuballa
 
Cloud Native Java:GraalVM
Taewan alvin Kim
 
Cloud Native 자바 플랫폼: Graalvm Overview
Oracle Korea
 
Oracle SQL Developer Top 10 Tips & Tricks
Jeff Smith
 
The Future of Java and You
Heather VanCura
 
JSON and PL/SQL: A Match Made in Database
Steven Feuerstein
 
SMART4apex company presentation APEX world convention March 25 2014
Sergei Martens
 
Open Closed Principle kata
Paul Blundell
 
D34010.pdf
RuchiNagar3
 
What's New in Innoslate 4.4?
SarahCraig7
 
OOW16 - Testing Oracle E-Business Suite Best Practices [CON6713]
vasuballa
 
Ad

More from Steven Feuerstein (10)

PDF
New(er) Stuff in PL/SQL
Steven Feuerstein
 
PDF
Six simple steps to unit testing happiness
Steven Feuerstein
 
PDF
New Stuff in the Oracle PL/SQL Language
Steven Feuerstein
 
PDF
AskTOM Office Hours on Database Triggers
Steven Feuerstein
 
PDF
Error Management Features of PL/SQL
Steven Feuerstein
 
PDF
Oracle PL/SQL 12c and 18c New Features + RADstack + Community Sites
Steven Feuerstein
 
PDF
AskTOM Office Hours - Dynamic SQL in PL/SQL
Steven Feuerstein
 
PPT
Database Developers: the most important developers on earth?
Steven Feuerstein
 
PPTX
The Amazing and Elegant PL/SQL Function Result Cache
Steven Feuerstein
 
PPTX
Take Full Advantage of the Oracle PL/SQL Compiler
Steven Feuerstein
 
New(er) Stuff in PL/SQL
Steven Feuerstein
 
Six simple steps to unit testing happiness
Steven Feuerstein
 
New Stuff in the Oracle PL/SQL Language
Steven Feuerstein
 
AskTOM Office Hours on Database Triggers
Steven Feuerstein
 
Error Management Features of PL/SQL
Steven Feuerstein
 
Oracle PL/SQL 12c and 18c New Features + RADstack + Community Sites
Steven Feuerstein
 
AskTOM Office Hours - Dynamic SQL in PL/SQL
Steven Feuerstein
 
Database Developers: the most important developers on earth?
Steven Feuerstein
 
The Amazing and Elegant PL/SQL Function Result Cache
Steven Feuerstein
 
Take Full Advantage of the Oracle PL/SQL Compiler
Steven Feuerstein
 
Ad

Recently uploaded (20)

PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 

Unit Testing Oracle PL/SQL Code: utPLSQL, Excel and More