Cards Linked With LOs Flashcards
Cards relating to the LO's, these cards have mostly been created for the authors learning, and may not represent all of the LOs
White-Box Testing
White Box Testing is the testing of a softwares solutions internal coding and infrastructure. This testing is inside the box. Also know as, Clear, Open, Structural or Glass Box Testing This involves checking a series of predefined inputs against expected or desired outputs How to perform: 1. Understand the source code 2. Create test cases and test them Uses Code Coverage Analysis
Black-Box Testing
This involves testing from an external or end-user type perspective. Only end user experience is tested - just the interface Doesn’t concern the internals of the ‘box’. Types: Functional Testing Non-Functional Testing Regression Testing How to perform: 1. Examine initial requirements 2. Tester uses valid and invalid inputs and predicts the outputs
Code Coverage Analysis
It identifies areas of a program that are not exercised by a set of test cases. Once gaps are identified, you create test cases to verify untested parts of code, thereby increase the qualify of the software product. Used by White-Box Testing Uses the following techniques -Statement Coverage -Branch Coverage
Statement Coverage
Requires every possible statement in the code to be tested at least once during the test process. Used by Code Coverage Analysis
Branch Coverage
Checks every possible path (if- else and other conditional loops) of a software application Used by Code Coverage Analysis
Functional Testing
Is related to functional requirements of a system; it’s done by software testers. Part of Black-Box Testing
Non-Functional Testing
Not related to testing pod a specific functionality, but non-functional requirements such as performance, scalability or usability. Part of Black-Box Testing
Regression Testing
Is done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code. Part of Black-Box Testing
Five Causes of Poor Software Quality
- Lack of Domain Knowledge 2. Lack of Technology Knowledge 3. Unrealistic Schedules 4. Badly Engineered Software 5. Poor Acquisition Practices https://www.datamation.com/applications/top-five-causes-of-poor-software-quality/
Volere Template
Template for a requirements document. Also includes other issues that may affect requirements. The template his organised into five main sections - Project drivers, Project constraints, Functional requirements, Non-functional requirements and Project issues. https://learn2.open.ac.uk/mod/oucontent/view.php?id=1681023§ion=6.1
Volere Snowcard
This is written for each functional and non-functional requirement, including the following information: requirement number – this is to identify the requirement uniquely event/use case – identify which use case or event is associated with this requirement description – a one-sentence statement of the intent of the requirement rationale – why the requirement is considered important or necessary originator – who raised the requirement in the first instance fit criterion – this is the acceptance criterion, written in a quantified manner so that the solution can be tested against the requirement customer satisfaction/dissatisfaction – this is an indication of the customer’s reaction to the requirement’s omission from the solution priority – a mark of the value of the requirement for the customer conflicts – requirements that contradict this one or make this one less feasible supporting materials – link to other documents to help understand the requirement history – origin of and changes to the requirement. https://learn2.open.ac.uk/mod/oucontent/view.php?id=1681023§ion=6.1
Software Architecture
“The software architecture of a program or computing system is the structure or structures of the system, which comprise software elements, the externally visible properties of those elements, and the relationships among them.”
Excerpt From: The Open University. “TM354 Block 3 Unit 9”. Apple Books.
Examples of Software Architecture
- LAMP stack
- client-server
- peer-to-peer
- pipe and filter
ASR
Architecturally Significant Requirments
“the requirements that drive a system’s software architecture. The four characteristics they identified were as follows.
- Quality attributes* are non-functional requirements such as security, reliability, availability, usability, maintainability, portability and so on that you have met in earlier units. In Unit 10 we shall look in some detail at how these quality attributes (often called ilities) drive architectural decisions.
- Core features* are described by Chen et al as ‘the problem the software is trying to solve’. For example, an online chat application is intended to allow participants in different locations to exchange text messages. To do this a network of some sort is essential, which immediately has implications for the architecture.
- Constraints*. All requirements can be described as constraints, but here the authors mean requirements such as technical constraints – for example, the client may have specified a particular programming language – or non-technical constraints such as budget or time.
- Application environment.* This is the environment in which the system will run. For example, a navigation app will need GPS connectivity.”
Excerpt From: The Open University. “TM354 Block 3 Unit 9”. Apple Books.
TDD
Test-Driven Developent
Code for this is wirten in very small increments - usually no more than five or ten lines of code. There are six principle steps to this; decide of a code increment, decide on a test, write the test, run all the tests, write the code, run all the tests again.
Unit Testing
Unit testing is usually perform on classes of object-oriented systems. The focus is on the systmatic testing of metods using test classes. An common example for this in Java is JUnit. Each time the tests are run, JUnit generates a report listing that itemises which tests the software passed and which failed.
The first stage of developmental testing in which units of functionality (for example, the classes in an object-oriented system) are tested in isolation.
Examples of Testing
- TDD
- Black-Box Testing
- White-Box Testing
- Unit Testing
- Functional Testing
- Non-Functional Testing
- Usability Testing
- Requirements-based Testing
- Developmental Testing
- Regression Testing
Benefits of TDD
“TDD is claimed to bring many benefits, including the following:
- Test coverage*: Test coverage is in some respects comprehensive, with virtually all code having associated tests. These tests should all have been run successfully throughout development. Finished code therefore already has an extensive test suite.
- Regression testing and early discovery of errors*: Many kinds of error are discovered and corrected at the earliest opportunity. Changes that break tests can be quickly identified and rectified.
- Executable documentation*: The tests both show how the code should be used and indicate what it should do by means of test cases.
- Beneficial effect on design*: The writing of tests contributes to design as well as to testing. TDD encourages clarity, modularity and a focus on interface over implementation.
- Complementarity with DbC*: TDD tests by test cases, whereas DbC tests by invariants. These perspectives are usefully complementary.
- Promotes good code quality*: TDD promotes sustained focus on quality, design for testability and early and frequent refactoring.
- Inhibition of ‘featuritis’*: Because addition of extraneous code is discouraged during TDD cycles, creeping featuritis – the addition of unnecessary features – is inhibited.”
Excerpt From: The Open University. “TM354 Block 3 Unit 11”. Apple Books.
Limitations and Pitfalls of TDD
“User interface: TDD does not readily apply to user interface testing, for which it is better to apply techniques such as usability testing.
Testing of applications integrated with databases: TDD alone is not adequate for the comprehensive testing of databases.
Multithreaded systems: TDD is not generally suitable for the testing of multithreaded systems, as results may depend on the vagaries of timing.
Customer acceptance: TDD cannot take the place of customer testing.
Legacy systems and systems reusing large code components: If large amounts of code are being reused and TDD was not applied when they were being coded, then at best unit tests can be added retrospectively. Such a retrofit would not constitute TDD, since the testing would not guide the evolution of the code. In many cases, retrofitting unit tests to large bodies of existing code may be impractical.
Management support: If management chooses to penalise time spent on writing tests during development, TDD is unlikely to flourish.
Code whose requirements are liable to change greatly: Sometimes, for example during scientific research or product development research, the purpose of developing software may be to find out what the requirements should be in some little-understood area or what happens in some poorly understood situation. This is known as exploratory programming. In these and other situations, requirements may change so extensively and frequently that there is repeated wholesale invalidation of existing unit tests. This would render TDD a hindrance rather than a help.
Integration testing: TDD cannot take the place of integration testing, for reasons discussed below in detail in subsection 4.3.
TDD is only as the tests devised: Devising good tests and effective test cases is an important art and one that applies with a scope far beyond TDD alone. Because of this wider scope and importance, we will defer the discussion of strategies for creating test cases until Section 4.4, at which point you will have had a chance to become familiar with wider aspects of testing.”Excerpt From: The Open University. “TM354 Block 3 Unit 11”. Apple Books.
DbC
Design by Contract
The process of developing software based on the notion of contracts between objects, which are expressed as assertions.
“One way to ensure that a software system performs its intended functions (its specification) is based on the real-world concept of a contract.”
Excerpt From: The Open University. “TM354 Block 2 Unit 6”. Apple Books.
“In real life, contracts are very often formal and binding agreements between two parties; in object-oriented software development, contracts are used to produce more formal descriptions of objects and the services they provide.”
Excerpt From: The Open University. “TM354 Block 2 Unit 6”. Apple Books.
Assertion
In DbC, a precondition, a postcondition or an invariant.
Class Invariant
A constraint that must be true at all times, other than during when one of its methods is executing. A statement about the values of the attributes of a class that must hold for all instances of that class.