Toad World blogs are a mix of insightful how-tos from Quest experts as well as their commentary on experiences with new database technologies. Have some views of your own to share? Post your comments! Note: Comments are restricted to registered Toad World users.
Do you have a topic that you'd like discussed? We'd love to hear from you. Send us your idea for a blog topic.
Friday, February 22, 2013 6:17 AM
I recorded a new video introducing developers to one of my favorite features in Code Tester for Oracle: the rather plainly-named Run Program. I like to call it "Run-to-Test".
It has become clear in the years since we first released Code Tester that a whole lot of PL/SQL programmers do not want to have to sit around and build test cases.
They want to run their code and see what happens.
So we decided to add that capability inside Code Tester, make it better than the "run program" feature available in any other PL/SQL programming tool, and allow you to save the results as a test case, thereby incrementally building up your regression test while barely noticing you are doing it.
What makes Run Program in Code Tester better than any other is that it allows you to enter values through a grid for all arguments, no matter how complex they are (example: a collection of records, one field of which is itself a collection). That was quite a feat of software engineering (no, it wasn't me!) and so far as I know, no other tool can yet do that.
Sound interesting? Check out the video!
Code Tester for Oracle is a powerful automated testing tool for PL/SQL programs. The basic idea behind this is motivated by the Test Driven Development methodology: rather than writing your program first and then struggling to find time to test it, you write your test first and then as you build your program, you verify it against the test.
In Code Tester, this means that you can use the Test Builder to describe the expected behavior of your program with a given set of inputs and initialization code, and then Code Tester generates the test code (a PL/SQL package) for you. Change the inputs, and Code Tester re-generates the test package.
I was involved in the original design and implementation of Code Tester and it is one of my proudest accomplishments for PL/SQL developers (along with my first book, Oracle PL/SQL Programming, and the PL/SQL Challenge
“Happy testing” might sound like an oxymoron, but when you use Code Tester, you really can have much more time to develop because you need less time to test and your solid code makes management and users happy. Happy testing!