Unit 11 - Product quality: verification, metrics and testing Flashcards
What does TDD (Test Driven Development) demand?
Before any code is written, tests should be written for that code to meet. Just enough code should then be written to pass those tests – then further tests should be written and so on. On each iteration all of the tests should be run.
What advantage does running all test on each iteration have?
This approach has the major advantage that as development proceeds, and after any change, a complete suite of tests can be run at the press of a button
How does TDD help the design process?
In practical terms, TDD eases the process of making changes to code at late stages in development, simply because the accumulated tests provide assurance that changes have not broken the code. In object-oriented contexts this whole approach is generally relatively convenient to manage due to the existence of unit testing frameworks such as JUnit.
How do Pre- and postconditions in DbC differ from unit tests in TDD?
Pre- and postconditions, like the unit tests of TDD, are a form of executable documentation. Unlike unit tests, they focus on invariant conditions rather than on test cases. Some of the benefits of using assertions can be enjoyed whether or not DbC is applied strictly, such as the use of assertions to identify how and where problems arise at run-time.
Define appropriate quality
Software that is fit for its purpose and of sufficiently high quality. One way of characterising the
notion of appropriate quality is to say that it is in conformance to the requirements and expectations of the customer.
What can we check to establish if quality is appropriate?
. how the product operates against what was both explicitly required and implicitly expected by the customer
. that quality and development standards – whether in-house rules or ISO 9000 mandated practices – have been followed
. that best practice of software engineers, as professionals operating to professional standards, has been followed during development.
Suggest three expectations that a customer might have of a software product without perhaps being aware of them.
Three possibilities are:
. the product will not conflict with other software that they use
. the product will boost productivity
. the product will be simple to use.
Software Quality Factors (SQFs) can be grouped into six classes. What are they?
Functionality, reliability, usability, efficiency, maintainability and portability.
SQFs affected by product operation requirements include?
SQFs affected by product operation requirements include:
. correctness: how well a system fulfils the customer’s overall objectives – how well the software does what the customer wants
. reliability: the likelihood with which a system can be expected to perform its intended function – how well the software does what it is supposed to do
. efficiency: the level of computing resources (including time) required by a system to perform its function – how well it runs on the customer’s hardware
. integrity: the strength of measures to ensure that modification or deletion of data by unauthorised persons (or by any other unintended means) does
not occur
. usability: the effort required to learn about, operate, prepare input for and interpret the output of a system – how easy the system is to use.
SQFs affected by product revision requirements include?
. maintainability: the effort required to deal with expected changes and to understand, locate and fix errors in a system
. flexibility: the effort required to modify an operational system – how easily the system can be changed while in service
. testability: the effort required to test a system to ensure that it performs its intended function. Different kinds of testing may vary according to how easy they are to adapt when requirements are revised.
SQFs affected by product transition requirements include?
. portability: the effort required to transfer the system from one hardware platform and/or software environment to another – how easily the system
can be used on another machine should the customer change their platform or should other customers require it
. reusability: the extent to which a system (or system component) can be reused in other applications – how easy it is to reuse some of the software to make future developments more cost effective
. interoperability: the effort required to couple one system to another – how easy it is to interface the system with another, should the customer require it.
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 one other pair of SQFs that are not independent
Another pair of SQFs that are not independent is 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 of primary importance?
. 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. Defects may be identified by testers or reported by users of a software product after the product has been released for general use. In the case of a large project
they may be counted over a standard period of time, for example one month.
. Integrity. This is measured by considering the proportion of ‘attacks’ on a product as opposed to bona fide uses. In cases where integrity is of great
importance, and different kinds of attack can be identified, it can be useful to measure or estimate quantities such as the likelihood that an attack of a
given type will occur within a given time and the likelihood that an attack of a given type will be repelled. If historical data is available that allows
these probabilities to be calculated with some accuracy, for example using information from a log file, then it becomes possible to assign numerical
values in a simple way to the integrity of a system.
. 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.
. 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. For any system that depends on how users will interact with it, user interface design and testing should be continual engineering
focuses.
What is validation?
Validation is concerned with whether the right product is being built.
Validation does not assume that either the specifications or development processes are adequate. Validation focuses on ensuring that outputs meet the needs, including implicit needs and expectations of
customers and stakeholders. These may never have been written down. For this reason validation is generally harder than verification. Validation can
have far-reaching effects and can result in changes to specifications or organisational processes, or both. Validation ultimately depends on acceptance by customers.
What is verification?
Verification concerns whether the product is built in the right way.
Verification assumes that the current specifications are
correct and focuses on ensuring that development processes produce outputs that meet the specifications. More specifically, verification tests the extent to which the product conforms with the various, often evolving, system descriptions designed to help produce it.
Verification of a system involves which two tasks?
. ensuring that all system descriptions are self-consistent
. ensuring that all system descriptions are consistent and complete with respect to those from which they were derived.