Toad World® Forums

Automatic generation, compilation and run of tests?


#1

Is there a simple way in the current version of Quest Code tester to run the following automatically from the back end:

  • import test definitions
  • generation of the test code from these
  • run the test code
  • check and ‘report’ on results

Every night we re-install our application schemas automatically using the latest CVS version of our installation scripts and we would like to run the above after the schema installs to prove that our PL-SQL code still passes the unit tests.

What are the current options for these? Call some of the QCT packages from the Database server for each of the above tasks?
Is there another way?

I’ll be happy if I could write a ksh script on the DB server calling QCT packages.

Aditinally, for our Java Code, our java team uses Junit within Cruise control, do you plan to have support for running tests in Cruise Control?

Thanking you in advance.

Philippe


#2

Philippe, Have you checked the help doc on these topics:

How do I…Use Command Line Options
Appendix -> PL/SQL API to Quest Code Tester Features

Greg, do you see anything below that we cannot do with the command line?

Thanks, SF


#3

Many thanks Steven,

I will try and use these commands …

Rgds

Philippe


#4

Everything listed except Reporting is currently available via the Code Tester command line.

To accomplish the same via the PL/SQL API is partly feasible but 1.6.1 is missing the generation step which has been added for 1.8. So in 1.8 (BETA available online), the export scripts can be executed directly (they are just SQL and PL/SQL blocks) and then the run API invoked (documented in Help file). The test script will then be generated and the test package executed. Then the results are returned via a ref cursor.

Regards,
Greg


#5

Is there a list of new and improved features available for testing in
the 1.8 beta?


#6

Thanks Greg,

I have started trying command line options and I can see how they open the QCT client, perform actions in it, close etc…

I would have 3 questions to yourself and/or Steven

  1. am I right in thinking that:
  • command line options require that the QCT client is installed on the machine where they run
  • whereas APIs are PL-SQL/SQL that can be called from any Oracle connection to the DB (DB server or any client with a connection) so can be run without the QCT client?
  1. The nightly build I am setting up would have scripts running from a Linux machine (different to the DB server) with a scheduler on it (Cruise Control) so if the above is true, using command line will require installation of QCT client on this Linux machine?
    Is QCT supported for Linux? Same disk/download?

  2. in 1.8, APIs will cover all the requirements in my post within PL-SQL and SQL and there will be no need to install the QCT client?

Rgds

Philippe

Message was edited by: tapph


#7

Hi Philippe,

Use of the command-line options do require the Code Tester client to be installed. The Code Tester client only runs on Windows so cannot be used on a Linux box unless you run it using Windows emulation software (which we have not tested and may not work).

The PL/SQL API can be executed wherever you can execute Oracle SQL/PLSQL including Linux with the Oracle client software installed. This only requires that the Code Tester repository be installed and accessible to the connected Oracle user and does not require that the Code Tester client be installed.

Version 1.8 adds the automatic generation of the test package when the RUN_TEST_FOR API program is executed in addition to running the test and returning results. The exported test definition files (.qut) can be executed via SQLPlus to load into the repository just as in 1.6.1.

Have a great day!

Regards,
Greg


#8

Thanks a lot Greg, this is very clear

Now I know what all the options are for nightly deployment

I will try at the first opportunity.

Rgds

Philippe