Make your own free website on

Development of Application with Cantata

Application: Online Banking System

Testing tool: Cantata

Online Banking System is getting more recognition from users for its convenience and reliability. With this system, users can check their account balance, check their transactions, make transfers, pay bills and other services provided by perspective banks in front of their computers. So, important and confidential information is entered into the network. Therefore, security features are at top priority.

Please go to: for an online banking system test run.



In real time, transactions are made in the Online Banking System. The Cantata testing tool can help in the development if the application by making sure that correct data is received and that the computation of the new amount of the balance should be done correctly within the defined time constraints.

With Cantata, software testers can specified the specification for the test cases to test on their system/application. In this case, software testers have to specify test cases to check if every transactions computed correctly and that each function of the application is running without error. The feedback from the result of the test cases will show if the system is flawless or not.

Firstly, to ensure that the transactions is done in the within the specified amount of time, The Timing Analysis in Cantata permits executions time to be recorded and tests passed or failed depending on the real time performance of the software/application under test

Figure 1


Secondly, to do testing on the coding. The Cantata test cases are controlled by a 'Test Script' which can be either coded by the user or generated by Cantata's Test Script Generator (CTS). The test script is compiled and linked with Cantata Test harness (CTH) and the software/application under test. This produces an executable program which, when run, produces a test results file.

Figure 2


The benefits of this approach are:


Traditional Data Processing

The Online System Banking involves traditional like the input and the outputs from the application. The software testers have to make sure that the input and the output of the application are as expected.

The Cantata Harness (CTH) is specifically designed for this. CTH verifies data using CHECKED directives. Theses cause the comparison of a data item with its expected value.

Checked directives are provided with CTH for all C/C++ standard types. In addition, CTS automatically generates check directives for user defined types such as structures and enumarated types using CTH Check primitives.


Mission Critical

It is critical that the Online Banking System processes the data correctly. For example, when user B deposit an amount of $F. Account B should get the deposit of $F and not any other accounts. Therefore, it is vital that the application has done the testing in Figure 2 with the appropriate test script. When the Cantata test is run, a results table is displayed summarising the results for each test case and providing total figures. An overall test pass or fail is provided.

Figure 3


Additionally, it is important that the software testers analyze the result of the test cases. Any event which is classed as 'unexpected' is highlighted with >>, and appropriate diagnostic message. For example, a check which fails will be marked with >> FAILED and a diagnostic will give both the actual and expected values of the item being checked.


The output below contains a typical section of a CTH output file:

CTH v3.0 (c) 1993 IPL Information Processing Ltd 
Test Results For : example 

Results File : example.ctr

Tests Run At : Thu Feb 17 09:38:32 1994


-------------------------- Start Test 001 ------------------------------

     EXECUTE: my_function,

         Expected calls = 1

         START_STUB : my_stub

              CALL_REF/ACTION: Action 1, Call 1

              Check PASSED : my_stub_string

              Item = "Hello, world"

         END_STUB : my_stub

     DONE : my_function

Check FAILED : my_external >>

Expected 0x0000712B 28971 
Item 0x000080E8 33000 
------------------------- End Test 001 ---------------------------------

At the end, a table of results gives the complete statistics both for each test case and for the overall test: 

Tests Completed At : 09:38:32
Test    Script  Checks  Checks  Checks  Stubs   Paths   Assertions      Status       
Errors  Passed  Failed  Warning Failed  Failed  Failed 
PTE     0       0       0       0       0       0       0               PASS 
001     0       0       1       0       0       1       0               >> FAIL 
ANS     0       0       0       0       0       0       0               PASS 
Total   0       0       1       0       0       1       0               >> FAIL

This table of results shows that test 1 has failed due to a failed data check and, therefore, the overall test has failed.