| AdaTEST for long-term quality |
 |
| The Typhoon, formerly EFA, undergoing Flight Trials |
| For the case study in this issue of Testing Times we look at a company that started unit testing with AdaTEST several years ago and has now gained considerable experience in producing large volumes of high quality Ada software. This experience has been gained in the context of a long-term multinational program, involving an overseas customer and overseas partners. |
| Pilkington Optronics (PO) is a joint venture company owned by Thomson CSF and Pilkington Glass plc. It specialises in the design and manufacture of electro-optical products for a wide range of military and civil programmes covering the full breadth of land, sea and airborne applications. A major programme under development at the Pilkington Optronics Staines facility is the combined Forward Looking Infra Red (FLIR) and Infra Red Search and Track (IRST) sensors to be fitted to the new Eurofighter Typhoon fighter aircraft. |
| Pilkington Optronics are working within a consortium called EuroFirst with Italian and Spanish partners (FIAR, part of Finmeccanica, based in Milan and Tecnobit based in Madrid). EuroFirst won the contract in 1992 and will move into flight trials during 1999. |
| Motivation to find an Ada testing tool |
| PO's role in EuroFirst was to act as design authority for the project, which meant that they had front line responsibility for the major software decisions in the programme. The project was designated EFA Risk Class 2 and later upgraded to risk class 2*, requiring a high standard of software engineering. This involved the use of certain mandated standards and development practices. Some of the most significant constraints placed on the project by the EFA consortium, were the use of the Ada language and use of the HOOD design methodology. Chief among the software testing requirements was the need to demonstrate 100% code coverage (for statements and decisions). |
| The PO project engineers were also acutely aware of the need to automate as much as possible of the software testing process. Their previous work on an earlier system had brought home the benefits of tools in bringing consistency and productivity to the Ada testing process. The dangers of not using tool support, were that testing would be ad-hoc, leading to too many bugs slipping through the V&V net, only to be discovered (expensively) late in the day. In addition, the sheer volume of code expected on the IRST system meant that, without automation, the unit testing phase would be extremely expensive. |
| Evaluation |
| The team under project engineer Dick Franks set up an evaluation of some candidate testing tools including AdaTEST. The first requirement was to find a tool which would enable the contractual requirements on test coverage to be met, and added credit would be given to the tool which best enabled the general goal of 'better testing' to be achieved. |
| In the event, only two tools were evaluated in detail, and of these AdaTEST became the preferred one. The reasons were simply that AdaTEST gave accurate measurement of test coverage (thus meeting the first requirement) over the entire range of Ada syntax. In addition AdaTEST's test harness facility was found to be robust and simple to use. AdaTEST gave approximately a three-to-one advantage over its rival in terms of the effort required to test a module, and was able to do so without repeated errors. Franks' conclusion in October 1994 was to recommend selection of AdaTEST on the fundamental grounds that, "It could perform the required job, without fuss". |
| Deployment and use |
| AdaTEST was eventually procured for project use in mid-1995, and training courses were provided by IPL to support the deployment. By then, AdaTEST was able to offer the Script Generation facilities so, after some initial hesitation, these were adopted and have become the project's standard method of using the tool. Greg Ives and Ian Flack were the project engineers with most responsibility for the tool's day-to-day use. They were instrumental in the establishment of design principles which have greatly contributed to AdaTEST's success, and have also created a number of AdaTEST 'add-ons' which have extended its functionality. Some of their ideas can be described thus: |
| 1. Maximise Host Testing. For numerous reasons initial code testing on the host is preferred. This has meant close attention to 'design for testability' practices including the ability to swap target-specific addresses for host-accessible ones as much as possible. By employing such practices it has been possible to test around 98% of the code on the host before going near a target system. |
| 2. Automate Detection of Sub-program Calls. The design methodology used (HOOD), led to the specification of objects and associated operations, which could be coded as Ada packages and sub-programs. An AdaTEST extension was created by Ives which allowed the test team to identify automatically whether any operation of the object under test had NOT been exercised. |
| 3. Stubbable Error Logging Calls to Force Execution of 'Hard-to-Reach' Code. Some parts of the code especially certain exception handlers would have been very hard to exercise without the use of stubbed Error Logging calls. These permitted the raising of exceptions which then diverted execution into an appropriate handler, allowing coverage targets to be met. This is an aspect of the general discipline of 'design for testability'. |
| 4. Negative Tests on Package Body Data. AdaTEST automatically detects accidental corruption of data declared in Ada package specifications. Ives created a new facility which did the equivalent for package body data. |
| For all the above, AdaTEST's open architecture has made it easy to add the extra facilities. |
| Conclusions |
| Three years on, what can the team point to? There is the production of over 250 HOOD objects, coded in Ada and amounting to over 160,000 lines of source code. The use of AdaTEST Script Generation has made testing of this volume of code economic and maintainable. The scripts are described, by project engineer Ian Flack as "easy to write and review, and most importantly to enforce a consistency of style." A side benefit has been that the scripts have lent themselves very well to incorporation into the project documentation, thus saving a lot of effort in otherwise needlessly translating between a software module test plan and its implementation as a working script. |
| For the Software Manager, Cliff Edwards, there has been one overriding benefit, which is simply that AdaTEST has been instrumental in allowing the project to produce a lot of code with a very low residual bug level. This is satisfying in its own right, and good for the engineers' professional self-esteem, but also vital in this particular circumstance of having to co-operate with outside partners to deliver a high-integrity product. Edwards is adamant that the satisfaction of being able to deliver virtually bug-free software and have the FIAR and Tecnobit engineers integrate it without problems, makes the whole unit testing effort worthwhile! |
| IPL wish to thank the Pilkington Optronics team for their co-operation in sharing their experiences in this Case Study. We wish them well with their ongoing work. |