Software testing (Week 10) Flashcards

1
Q

What is a bug?

A

A software bug occurs when at least one
of these rules is true

• The software does not do something
that the specification says it should do.
 • The software does something that the
specification says it should not do. 
• The software does something that the
specification does not mention. 
• The software does not do something
that the product specification does not
mention but should.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the goals of testing?

A

To demonstrate to the developer and the customer that the software meets its requirements

  • at least one test for every requirement
  • tests for each feature as well as combinations of features

To discover situations in which the behaviour of the software is incorrect, undesirable or does not conform to its specification
- discover undesirable system behaviour such as system crashes, unwanted interactions with other systems, incorrect computations and data corruption

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

What are the software testing axioms?

A

It is impossible to test a program completely

Testing cannot show the absence of bugs

Not all bugs found will be fixed

It is difficult to say when a bug is indeed a bug

Specifications are never final

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

Why is it impossible to test most programs completely?

A

The only way to be absolutely sure software works is to run it against all possible inputs and observe all of its outputs

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

What is verification?

A

Check against the specification whether the product is built right

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

What is validation?

A

Check against the user requirements whether the product is built right

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

What is the V-model?

A

The V model of testing was developed where for every phase, in the software development life cycle (SDLC) there is a corresponding testing phase

The V model is an extension of ‘plan-based’ development methodologies, such as the waterfall model

  • unlike the waterfall model, in the V-model, there is a corresponding testing phase for each software development phase
  • At each stage of the SDLC, test cases are produced to be applied to the software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

V-model vs Agile development

A

V-model is very difficult to apply to an agile methodology
However, some principles are common between the two, eg:
- Kill bugs at their source
- Agile best practise is to address bugs in the iteration they are discovered
- ‘Phase containment’ in v-model - remove defects at their point of introduction

Acceptance criteria
- user stories (agile) and requirements (v-model) both include acceptance criteria. i.e what will be tested, how can they be successful

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

What is unit testing?

A

Process of testing individual components in isolation
- test driven development creates tests before the code

Units could be individual functions, classes or components with well defined interfaces

Purpose to validate that each unit of software performs as it was designed

‘linter’ - types of tools that assess code for bugs, errors, inconsistencies, etc - before it is run/compiled (static code checks)
- useful for interpreted languages, eg: python

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

What does complete test coverage of a class involve? (unit testing)

A

Testing all operations associated with an object

Setting and interrogating all object attributes

Inheritance makes it more difficult to design object class tests as the information to be tested is not localised
 - parent/child class operations may need to be considered

Test normal operation of the object/function/component

test abnormal input to see if it is handled correctly

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

What is Equivalence Partitioning/Boundary Value anaysis?

A

It is a type of black box testing technique that can be applied to all levels of testing

  • reduce range of inputs to ranges or classes
    • one test chase is chosen from each class
    • Reduces total number of test cases to be more manageable
    • Eg: Software accepts inputs between 1-1000
    • Divides this into 3 classes (above,below,within)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is BVA (Boundary Value Analysis)?

A

Type of testing

- many errors occur at boundaries or extremes of input values, Test extreme values and boundaries

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