Give two examples of executable documentation.
Unit tests and pre- and post-conditions
What is meant by ‘executable documentation’?
Executable documentation is documentation that allows code to be automatically checked for validity at run time. It should also demonstrate how the code should be used and indicate what the code does.
Suggest three expectations that a customer might have of a software product without perhaps being aware of them.
Three possibilities are:
Explain how increasing integrity within a system could affect efficiency.
Increasing integrity within a system means strengthening measures to ensure that modification or deletion of data by unauthorised persons, or by any other unintended means, does not occur. This might involve the use of passwords to access certain data and an authentication server to check a user’s identity, or it might mean that network traffic needs to be encrypted and decrypted. Each of these factors adds an overhead to processing, so efficiency is likely to be reduced.
Identify a pair of software quality factors (SQFs) that are not independent.
Usability and portability. For example, many of the features of the Apple Macintosh that contribute to its reputation for usability are built into its operating system. Applications that take advantage of these features are less portable to other systems, such as Windows or Linux.
What are the four SQFs identified as being of primary importance for everyday software products?
Correctness, integrity, maintainability and usability.
How could you assess correctness?
A popular measure for assessing correctness is defects per thousand lines of code (defects per KLOC), where a defect may be defined as a verified lack of conformance to requirements.
How could you assess integrity?
This is measured by considering the proportion of ‘attacks’ on a product as opposed to bona fide uses.
How could you assess maintainability?
Unfortunately there is no way to measure maintainability directly, and so we must measure it indirectly. A simple measure is mean time to change (MTTC), which is the average of the times it takes to analyse a bug report, design an appropriate modification, implement the change, test it and distribute the change to all users. In general, the lower the MTTC (for equivalent types of changes), the more maintainable the software product is.
How could you assess usability?
Any system with a user interface and that will be used by people other than the developers should be usability tested. Usability testing involves users systematically trying out the user interface and the system behind it – although for some purposes the system may be simulated. There are also forms of evaluation such as heuristic review that can be used to make substantial improvements to user interfaces without involving users.
What is the purpose of verification?
Verification tests the extent to which the product conforms with the various, often evolving, system descriptions designed to help produce it.
What is the purpose of validation?
Validation focuses on ensuring that outputs meet the needs, including implicit needs and expectations of customers and stakeholders.
What tasks does verification involve?
- ensuring that all system descriptions are consistent and complete with respect to those from which they were derived
What task does validation involve?
Give a simple example of two system descriptions that might contradict each other.
One example would be if a structural model for a hotel reservation system indicated that a reservation could be made for more than one room but the implementation only allowed one room per reservation.
Why is it important for the customer’s requirements statement to be self consistent?
If the customer’s requirement statement lacks self consistency, then either the resulting system will be inconsistent or it will not satisfy the customer’s requirements. The system builders can decide (implicitly or explicitly) how to resolve the inconsistencies or, if the inconsistent requirements affect different parts of the system and are not picked up by the developers, the developers could inadvertently build the inconsistencies into the product.
Describe three benefits of test-driven development.
Describe three limitations of test-driven development.
Give two reasons why it is useful to run a unit test before the relevant code increment has been written.
Describe the four distinct categories of testing.
Are there any situations in which system testing should be carried out by the implementers of a system?
Probably the only situation where this is appropriate is when the project team is small. In small teams, one person might play the part of requirements engineer, designer, implementer, tester and maintenance engineer.
What do you think is the relationship between system testing and acceptance testing?
In general, the same tests will be carried out during acceptance testing and system testing. System testing is an in-house activity and a customer need never know how system testing went – any bugs can be dealt with before the customer sees them. Acceptance testing, on the other hand, is conducted with much more at stake – the customer can accept or reject a system based on its performance at acceptance testing.
Why should regression testing be necessary even after the customer has accepted the product after acceptance testing?
Acceptance testing is the process of showing that the software meets the customer’s requirements, not that there aren’t bugs in the code. In fact, given that a system is put into use, bugs that require fixing are almost certain to be found after acceptance testing. In addition, the system will be maintained, with functionality added and changed, leading to a requirement for regression testing.
Use the following phrases, which describe four kinds of testing, to fill the gaps in the following three sentences.
usability testing; requirements testing; security testing; regression testing
TDD and DbC are valuable but not comprehensive tools for _________________.
TDD has ________________ built into it.
DbC and TDD cannot substitute for thorough _______________ or _________.
TDD and DbC are valuable but not comprehensive tools for requirements testing.
TDD has regression testing built into it.
DbC and TDD cannot substitute for thorough usability testing or security testing.