Nov 18, 2019 7:00:00 AM by Michael Staszewski
Today, is the official, general release date of Toad for Oracle 13.2. There many new features that go with this newest version, if you’re interested in reading more, read this blog, “13 new features in Toad® for Oracle 13.2.”
This blog is going to address two features that are within Toad for Oracle. The first feature, utPLSQL is integrated into every edition of Toad for Oracle. The second feature is Code Tester, and that module is available in the Developer Edition of Toad for Oracle. So, how do you decide which tool is best? And, why did Quest Software decide to enable utPLSQL in every edition?
Deciding which tool is a best fit depends on your goals and skillset.
If you’re a new developer or wishing to use a UI for test creation, Code Tester is a great tool to check out. A basic understanding of the tested code, datatypes, and other key concepts is required, but you don’t have to write the test PL/SQL yourself. With Code Tester for Oracle, you can click through test scenarios or use out-of-the-box tests. However, you will get more mileage out of Code Tester if you do have a strong technical skillset as Code Tester has advanced features for writing custom setup/teardown code, etc.
For PL/SQL developers, especially those who often devise homegrown testing solutions, utPLSQL is a great choice. utPLSQL test suites are normal Oracle packages containing all test logic. Since there are no test logic dependencies on tables or other objects provided by the framework, utPLSQL test suites are very portable. Test suites are 100% developed by you, although Toad does have a Create Unit Test window for producing Unit Test Suite stubs as a starting point. With utPLSQL you are only limited by your imagination and abilities.
Both Code Tester and utPLSQL support storing your test code alongside your tested code in a version control system (VCS); however, I find the process to be simpler and more intuitive with utPLSQL.
Code Tester supports import and export of test definitions via XML documents. Adding the XML documents to VCS allows you to track changes.
As previously mentioned, utPLSQL test suites are Oracle packages so you export the package DDL to file and track it just as you would any of your other code. Importing tests is as simple as compiling the packages on your database and is easily integrated into build pipelines.
Code Tester is a proprietary system requiring Code Tester at a minimum, Toad optionally, and Windows operating system to run those applications. utPLSQL is a database framework having no desktop application. It can be used by all users of the database regardless of their preferred tool (Toad, SQL Developer, SQL Plus, etc.) or operating system (Win, Mac, Linux.) Some companies have a mixed toolset to fit their budget. Toad for the DBAs and power users and other options for the casual developer, QA, or Analyst. utPLSQL allows all users within an organization to work on and run unit tests regardless of the tool used.
Both Code Tester and utPLSQL can produce reports for Run Results and Code Coverage. Both produce Run Results reports in Junit format suitable for consumption by build systems like Jenkins, Bamboo, and others. utPLSQL supports additional reporting formats including Run Results compatible with SonarQube, TeamCity, TFS/VSTS, and XUnit. It also produces Code Coverage reports for Sonar, Coveralls, Cobertura, and HTML. As an open-source framework, utPLSQL is extensible so you can write new reporters for any custom format required.
Quest is strongly committed to supporting continuous integration/continuous delivery (CI/CD). The cornerstone of success is high code quality. If you are doing test-driven development and writing your tests first, or using test automation, Code Tester in Toad for Oracle Developer Edition is a great choice. If you are writing your own tests, then utPLSQL is a good choice.
Unit testing is a critical part of the development phase of the CI/CD pipeline. If you are writing PLSQL without unit tests, then you are actively decreasing your DevOps readiness. One way to ensure high code quality is by having high code coverage; and to get high code coverage you need unit tests for your PLSQL code. Quest is a firm believer in best practices and if you are actively testing your code, you are actively preparing to be future ready. When the opportunity presented itself to provide open source unit testing, our dev teams worked hard to make that happen in every edition of Toad because that was the right thing to do to support PL/SQL developers ability create CI/CD ready development.
Code Tester, available in the Developer Edition and utPLSQL available in every edition.
Try Toad for Oracle Developer free for 30-days.
Have questions, comments, or an idea for a new feature? Interact with experts on the Toad for Oracle forum on Toad World®.
Written by Michael Staszewski
Michael Staszewski is a software developer with Quest who has worked on Toad for Oracle and related projects since 2002. Michael believes in learning and applying new techniques to the software he writes to improve application performance and stability—and for personal growth.