An Automated Scalability Test Example
The following example looks at an actual scalability test, which uses Toad for Oracle. The first step in the cycle is
to develop the required code. In this case, it is a procedure that inserts a record into an employee table.
shows this procedure in the Toad editor.
Before creating the procedure, I defined a set of tests in Toad Code Tester and allowed it to generate a test harness
to automate functional testing. Figure 2 shows the results of a
Code Tester run against the compiled procedure from Figure 1.
Example Procedure in Toad: The first step in the cycle is to develop code that inserts a record
into an employee table.
Results of a Code Tester: This figure shows the results of a code tester run against the compiled procedure from
After the functional testing is complete the next step is scalability and/or goal testing. To perform automated
testing the automated link is utilized into the Benchmark Factory interface. The next step is to choose a PL/SQL
procedure. The scenario wizard for procedure testing from Benchmark Factory (BMF) is shown in
with the chosen procedure selected.
Following the selection of the procedure to be tested, the wizard allows you to insert calls to provided
randomization scripts to ensure random variables are utilized during testing of the procedure
(see Figure 4
Procedure Selection: This figure shows the scenario wizard for procedure testing from Benchmark Factory.
Choosing Variables: The wizard allows you to insert calls to ensure random variables are utilized.
The next step is to choose the range of users used to execute the code simultaneously. In BMF, simply supply a lower
and an upper bound and the increment level. Figure 5
shows a test range of 1 to 50 with an increment of 10.
The test is executed after the user load profile is set. The results are provided in both tabular and graphical format
and you can dump it into an Excel Spreadsheet. Figure 6 shows
the first page of the tabular output from the procedure test.
Setting the User Loads: This figure shows a test range of 1 to 50 with an increment of 10.
Tabular Output: This figure shows the first page of the tabular output.
Of course management likes graphs, so who are you to argue? Figure 7
shows one of several graphs that you can output from the tool. The spreadsheet output also contains multiple graphs
ready to be cut and pasted into manually written reports if needed.
Figure 7. Example Graphical Output: This figuresshows one of several graphs that you can output from the tool.
The benefits of an integrated development, functional test and scalability/goal test environment at the individual
user level should be apparent. By using standard tools each developer produces code and testing reports for all
phases of testing that is passed on to the QA/QC group when they perform integration testing.
Automated Code Testing for the Developer
This article covered the difference between scalability and goal testing, shown example pseudo-code test harnesses
for manual testing, and shown an example test of an Oracle procedure using an automated testing interface. This
article should provide direction for developers seeking to learn about proper code testing and the tools available to
make testing accessible to developers.