Skip to content

testing

utPLSQL v2 vs. ruby-plsql/ruby-plsql-spec - part two (setup and basic reporting)

UTPLSQL_vs_RSpec

In my previous post I have described the conceptual differences between UTPLSQL and ruby-plsql frameworks for unit testing of Oracle database code. I have used a message_api package and unit tests for that API using both frameworks as an example. In this post I will focus on getting the tests to run and the feedback that we can we get from the tests using both frameworks.

utPLSQL v2 vs. ruby-plsql/ruby-plsql-spec - part one

UTPLSQL_vs_RSpec

Foreword

Unit Testing is around for quite a while. Since it started to become more and more popular, quite a few tools became available for Oracle database to allow unit testing of the database. There are the UI based tools like Quest Code Tester (now Dell Code Tester for Oracle), Oracle SQL Developer unit testing. There is DBFit by Goyko Adzic for regression and functional testing of databases (including but not limited to Oracle), there are probably many more of that kind, that I'm not aware of. There are also pure programming language based frameworks like UTPLSQL and ruby-plsql. There are probably (and hopefully) many more of that sort that I'm not aware of. Unit tests are meant to be created and maintained by software developers and are to help developers keep their code clean and valid throughout entire project life cycle. UI based frameworks for unit testing are putting a high abstraction and tight facade between the code and the developer. Those frameworks tend to limit the richness and variety of possible implementations for a test case and therefore are not suited for software developers. The time and cost of development and maintenance for UI-based unit tests is usually way beyond the benefits. Variety of program units that are possible to develop is infinite and the only limitations to what the unit can do are the programming language boundaries and developers creativity. For this reason itself, it is best to use a programming language of similar or higher flexibility to describe and test the behaviour for a unit. In this series of article I will focus on two programming language-based unit testing frameworks for Oralce, that I got familiar with and had opportunity to use.

Test Drive your Oracle database. Yes, it's doable. And it's fun!

06_Red_Green_Refactor Foreword Over a month ago I've made a big decision and a shift in my life. I've decided to move to Ireland and start a new career there. Since I moved, I have significant amount of free time, as I no longer waste 3 hours each day on commuting. Also, since my wife still leaves in Poland (for now), I'm all on my own when I finish my work. Well, maybe that's not 100% true, since now we have Internet with Skype/Hangouts/appear.in and others. Anyway. I'm not feeling lonely, but rather take advantage of the time that is given to me, to catch up on things I've neglected for some time.

How I started to create Unit Tests for Oracle PL/SQL code

Before I started working at Pragmatists I never actually took time or effort to research the web for automating the testing process in Oracle databases. My previous job was more about delivering solutions, advisory, analysis, design and implementation using the traditional cascade product delivery approach. I don't want to get into too many details on how it happened, that me, being a Oracle database developer, landed in Pragmatist, which is an Agile Software Development company specializing in Java, but all I need to say, is that nothing else but good came out of it for me.