Toad World® Forums

Sequencing Test Suites


#1

Hi,

i am just going through the trial of QCT and, as good a unit test tool as it appears, can be be utillised as a system testing tool?

From my understanding - each function/procedure has its own test case. In this test case you can have different test specs (i.e. have different input/outputs). It is then possible to group a bunch of test cases (individual functions/procedures from a single package) into a test suite. This is great, i imagine, if you want to test many/all of the test cases(functions/procedures) in a single package.

What if you want to test a sequence of events? I.e. an end-to-end test of a process?

Does QCT accomodate this in anyway?

My particular situation is that i have a database with lots of packages with lots of procedures (100’s if not 1000’s of procedures). Not all are used for the same process. And as my processes are along the lines of “Data In ---- DO STUFF ---- Data Out”, and the DO STUFF part can be 20-50 procedures from various packages, i was hoping it could somehow test each package individually and/or the process as a whole.

I hope all that makes sense!

Simon


#2

Simon,

We do not offer a formalized way of setting up a workflow of tests at this time.

Instead, what you can do is control the order of execution of test cases within a unit test, unit tests within a test definition, and test definitions within a suite.

So you should be able to create a test suite that runs everything in precisely the order you want to simulate the workflow.

You can also put code into the unit test and test case definitions to conditionally execute based on values returned by code you provide. This way, you can decide to stop the test from continuing if some previous step did not complete successfully.

All of these steps are covered in the Help doc.

Now, beyond that, you might want to do something else: you may have a test definition that tests 20 procedures of a package, but in one workflow you only want to run 3 of the 20 tests. In another workflow, you want to run a different 5 other tests.

To accomplish this, you will need to do some “fancy footwork”, in essence creating groups of related test cases. Again, this is not something we offer directly in the UI, but instead you will define programmatically.

I have attached a document that describes how you might best accomplish this. This document will also be part of the help doc in 1.8.3. In fact, it relies on a new version of the qu_helper package, so you will need to try this out with the 1.8.3 beta.

I am sorry that we don’t make this easier to accomplish, but I do believe that you should be able to achieve the desired effect.

Regards, SF
Defining projects and groups.doc (77.5 KB)


#3

Thanks Steven,

that was really helpful and a really quick reply - many thanks.

I am trying to achieve more of what you mentioned second. There are two types of testing i wish to do…

For each process i make, i add to the existing packages new procedures. So i want to be able to have all the procedures testable for a single package at a click of a button (which is basically a test suite), but i also want to be able to, as you say, play some fancy footwork and select one or two tests from each suite to build up a ‘process’.

I will read through your help file now and get back to you if i am still stuck!

Many thanks,

Simon