Testing Fundamentals Flashcards
Give two reasons why it isn’t possible to test every single aspect of a program
Number of possible inputs are too large
Too many possible paths through the system
Testing tells us which conditions functionality doesn’t work under
What are edge cases
What are corner cases
Max/min possible values
Extreme values
Due to their rarity they’re difficult bugs to handle so it’s hard to create situations where these cases can be tested
What is EMMA
How does EMMA work
An open source code coverage tool
It colours your source code to denote coverage - statement coverage level
You’re able to define the level at which you wish to work
Name the different types of coverage
Function/method - checks if a test has been written for all methods; includes constructors
Statement - Have each of your statements by tested by at least on of your tests
Decision coverage - Has every possible decision been tested (if/else)
Predicate coverage - Checks if every condition has been tested
e.g. if there are multiple conditions connected by and/or within a single statement
Define code coverage
The measurement of how much of your code has been tested
Give an advantage and disadvantage to white box testing
Give an advantage and disadvantage of black box testing
WHITE BOX
Advantage => High code coverage; tests can test many different paths throughout the program
Disadvantage => Knowledge of the internal can influence the testing - can lead to biased testing
BLACK BOX
Advantage => Likely to result in tests not expected by the programmer
Disadvantage => Lower code coverage; only tests a limited number of paths
What is static testing
]What is dynamic testing
Explain the three types of dynamic testing
Static => Assessing documents; checks if documentation about software design meets the users requirements
Dynamic testing => Testing that involves the executing of program code
White box => Internals of the program are known (tests are based on the code itself)
Black box => Internals of the program aren’t known (only know what should be output for a given input - tests only concerned with functionality)
Grey box => Know the required functionality and some implementation concepts (e.g. they may have the database but not the code behind it)
Give 4 advantages of the V model
Give 3 disadvantages of the V model
ADVANTAGES
Well structured
Works well when all requirements are understood
Simple to understand
Easy to manage - each phase has a definite end
DISADVANTAGES
Once the project is in the testing phase, difficult to go back and change functionality
Not suitable if requirements are likely to change
Working software isn’t created until later in the cycle
What is user acceptance testing
When are these tests composed
Why is it necessary
A form of testing where the software is tested in an environment that resembles how the software would be used, it makes use of realistic data
The user composes these requirements during the analysis phase
It ensures the user’s requirements are met
It’s validation activity rather than a verification activity
What is system testing used to test
Why is this testing required
The entire system as a whole
It’s required to ensure it doesn’t impair performance of the wider environment
e.g. if software relies on memory and the other software in the same system relies on memory, it can degrade the performance of the other software in the system
What is integration testing used to test
When the individual components are grouped together to make the final system
This is done because there may be unexpected behaviour at this point => if there are two individual components working well, when you put them together they may not interact they way you expected. e.g. if it’s associated with measuring something, they may both be in different units
What is unit testing used to test
Individual blocks of code
In procedural programming: functional level
OOP programming: object/class/method level
It’s the most widely used testing type
What is the difference between high-level design and detailed design
HIGH-LEVEL DESIGN
Describes platforms, systems, products, services that the system will depend on
Includes architecture diagrams => shows interface, components, networks etc
DETAILED DESIGN
Describes how the system should be constructed
Describes what the functions/objects/methods should be
You should be able to write tests before the actual system is implemented
Give two reasons why it isn’t possible to test every single aspect of a program
Number of possible inputs are too large
Too many possible paths through the system
Testing tells us which conditions functionality doesn’t work under