Hello, you are not logged in.  Login or sign up
Toad on Twitter Follow Toad Search Toad World Search
Blogger List   

All Recent Blog Entries
 

Johannes Ahrends
Unicode and Toad

Ben Boise
Toad SC Discussions

Kevin Dalton
Benchmark Factory

Steven Feuerstein
Oracle PL/SQL

Devin Gallagher
Toad SC discussions

Stuart Hodgins
JProbe Discussions

  Henrik "Mauritz" Johnson
Toad Tips & Tricks on the "other" Toads
  Mark Kurtz
Toad SC discussions
  Michael Lumbard
Toad SC discussions
Daniel Norwood
Toad for Data Analysts
Debbie Peabody
Toad for Data Analysts
Gary Piper
Toad Reports Manager
John Pocknell
Toad for Oracle, JProbe
Kuljit Sangha
Toad SC discussions
Bert Scalzo Indicates Oracle ACE status
Toad for Oracle, Data Modeling, Benchmarking
Jeff Smith
Toad product family
Richard To
SQL Optimization
Jim Wankowski
DB2 - LUW and z/OS
John Weathington
  Toad World Editor
Toad World issues

  Toad Data Modeler Opens in a new window
Data Modeling
 
  Real Automated Code Testing for Oracle
Quest Code Tester blog

Blogs
Toad and Database Commentaries

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.

Handling Complicated Tasks More Easily
 
Location: Blogs Real Automated Code Testing for Oracle    
 QCTOblog Monday, November 09, 2009
Did you know that in Code Tester 1.8.5 you can now perform in-line validation of your customization code? For more complex tests, this will save you lots of time and make it easier to build your regression tests.
 
The ultimate objective of Code Tester is easy to state: allow developers to test arbitrarily complex PL/SQL programs without writing any test code. That turns out to be really hard to do, so as we get Code Tester closer and closer to that goal, we also offer the ability to fully customize every aspect of your tests.
 
One of the nicest new features in Code Tester 1.8.5 is the ability to perform "in-line" validation of customization code. Prior to 1.8.5, the only way to see if your custom code had compile errors was to generate the test package, which meant that you had to close the window in which you entered the code. If that test package had errors, you had to then circle back to that window - a cumbersome process that frustrated users.
 
There are two ways to determine if the custom code you entered has compilation errors:
  1. Generate the test code (which will automatically happen the next time you try to run a test), which also attempts to compile the test package that will contain your test code.
     
  2. Ask Code Tester to perform in-place validation (while the customization window is still open). The steps to request in-place validation vary depending on if you are in Test Builder or Test Editor.

Test Builder In-Place Validation

In Test Builder, when you have the customization window open for the test case, you can ask Code Tester to check for errors in three ways:

  1. Press Ctl-Alt-V. 
  2. Select "Check for Errors" from the right click menu 
  3. Press the "Check for Errors" button.

All three options are shown below:

Test Editor In-Place Validation

When you press on the Customization tab at any level within the test definition, you can then edit custom code. Within this window, you can ask Code Tester to check for errors in three ways:
 
  1. Press Ctl-Alt-V.
     
  2. Select "Check for Errors" from the right click menu
Both these options are shown below:

When No Errors Are Found

If the custom code has no errors, then you will see this window:

When Errors Are Found

If your custom code contains one or more errors, Code Tester will open a window that contains all the customization code for the current element and also...

  • Custom code for elements above it in the test definition hierarchy.
  • If you ask to validate input or outcome custom code, custom code for all inputs.
If, for example, you request validation of test case custom code, you will also see in this window unit test custom code (if present). Code Tester does this because the test case custom code might reference custom code at that higher level.
 
All inputs are included because an outcome's customization code may also reference a local variable holding an input value.
 
You will see at the bottom of the window a grid of all errors reported from Oracle's USER_ERRORS data dictionary view. You can click on a line number in that grid and that line of code will be shown.
 
You cannot change any of the code in this window. Instead, you must close the window, change your code, and validate again.
 

Here is an example of the window:

 
Permalink |  Trackback

Comment:
Add Comment   Cancel 
Search Blog Entries
 
Copyright 2010 by Quest Software  | Terms Of Use | Privacy Statement | Contact Us