Testing Fundamentals Flashcards

1
Q

Give two reasons why it isn’t possible to test every single aspect of a program

A

Number of possible inputs are too large
Too many possible paths through the system

Testing tells us which conditions functionality doesn’t work under

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are edge cases

What are corner cases

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is EMMA

How does EMMA work

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name the different types of coverage

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define code coverage

A

The measurement of how much of your code has been tested

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give an advantage and disadvantage to white box testing

Give an advantage and disadvantage of black box testing

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is static testing
]What is dynamic testing
Explain the three types of dynamic testing

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Give 4 advantages of the V model

Give 3 disadvantages of the V model

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is user acceptance testing
When are these tests composed
Why is it necessary

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is system testing used to test

Why is this testing required

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is integration testing used to test

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is unit testing used to test

A

Individual blocks of code

In procedural programming: functional level
OOP programming: object/class/method level

It’s the most widely used testing type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the difference between high-level design and detailed design

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Give two reasons why it isn’t possible to test every single aspect of a program

A

Number of possible inputs are too large
Too many possible paths through the system

Testing tells us which conditions functionality doesn’t work under

How well did you know this?
1
Not at all
2
3
4
5
Perfectly