L14: Software Testing Flashcards

1
Q

What is software testing?

A

Testing is intended to
- show that a program does what it is intended to do
- discover program defects before it is put into use

Usually uses artificial data.
The results of the test run are checked for errors, anomalies or information about non-functional attributes.
Testing is part of a more general verification and validation process.
Testing can find errors but not prove their absence.
Formally specified tests replace extensive system specification documents in agile approaches.

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

What is verification and validation?

A

They can be used to establish whether the system is fit for purpose

Verification
- “Are we building the product right?”
- The software should conform to its specification

Validation
- “Are we building the right product?”
- The software should do what the user requires

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

What are some goals of testing?

A
  • Demonstrate that software meets requirements
  • System performs as expected given test cases
  • Discover faults, undesirable behaviour
  • Expose defects
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are some verification and validation methods?

A
  • Walk-through
  • Code review
  • Inspection
  • Formal methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between inspections and testing?

A

Inspections are concerned with the analysis of the static system representation to discover problems (static).

Testing is concerned with exercising and observing product behaviour (dynamic). System is executed with test data and operational behaviour is observed. (You actually run the code)

Testing looks at the program
Inspection looks at all the artefacts (requirements, architecture, UML, database schema, program)

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

Compare inspections and testing (adv/disadv.)

A

Inspections
- During testing, some errors can mask other errors
- Testing is not suitable for determining certain quality attributes

Testing
- Inspections are not suitable for finding errors due to unexpected interactions and timing/performance issues
- Small companies may not be able to find an independent inspection team

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

When do we test?

A
  • Development
  • Release
  • Production (after deployment)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Who does the testing?

A
  • Developers
  • Quality Assurance team (test engineers)
  • Domain experts
  • Users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the types of testing?

A

Functional
- Unit, component, interface, integration, acceptance, system

Non-functional
- Performance, scalability, security, usability, accessibility

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

How can testing be performed?

A

We want to automate testing as much as possible.

Knowledge of internal structure
- Opaque (PKA black box)
- Transparent (PKA white box)
- Partially transparent (PKA grey box)

Automation
- Manual vs automated

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

What is development testing?

A

All testing carried out during development:
- Unit
- Component
- System
- Acceptance (for agile development)

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

What is unit testing?

A
  • Testing the functionality of individual program units
  • Units may be functions, methods, class
  • Defect testing process
  • Tests that component acts as expected
  • Or show errors with abnormal inputs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some testing strategies?

A

Partition testing
- identify groups if inputs with common characteristics that should be processed in the same way, choose tests from each group

Path-based testing
- ensure path through the code under test is executed at least once

Guideline-based testing
- use testing guidelines to choose test cases
- guidelines can reflect commonly made/ previous errors

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

What is component testing?

A
  • Testing the functionality of components as defined in well-defined component interfaces
  • Software components are composite (made up of interacting components)
  • Shows that each component behaves as expected
  • Assumes unit testing on individual objects/components within the component have been testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is interface testing?

A

Aims to detect faults in interface

Interface types
- Parameter interfaces (data passed between methods)
- Shared-memory interfaces (memory shared between methods)
- Procedural interfaces
- Message passing interfaces

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

What is system testing?

A
  • Integrating components to create a version of the system
  • Testing the integrated system as a whole
  • Focuses on interactions between components
  • Checks component compatibility, interaction and transfer of data
17
Q

Compare system and component testing

A
  • There are individual components that have been developed and tested individually (potentially by different teams)
  • System testing is a collective rather than an individual process
18
Q

What drivers can be used for system testing?

A
  • Requirements/use cases (1 test per requirement)
  • Structure (check elements of system works correctly)
  • Statistics (assess trustworthiness using randomly sampled input data)
  • Risk (check system is not vulnerable)
  • Level of coverage achieved
19
Q

What are system testing policies?

A

Exhaustive system testing is impossible so testing policies which define the required system test coverage may be developed

Examples of testing policies
- All system functions that are accessed through menus should be
- Combinations of functions that are accessed through the same menu must be tested
- Where user input is provided, all functions must be tested with both correct and incorrect input

20
Q

What is acceptance testing?

A

Used throughout agile, and at the end of plan-driven

Give us a way of saying that something is ‘done’.

21
Q

What is test-driven development?

A

Test-driven development is a key component of most agile software development approaches.

  • Tests are written before code, passing the tests is a critical driver of development
  • Code developed incrementally, can only move onto next increment if current increment passes tests
  • Provides coverage as every code segment is tested
  • Debugging is simplified
  • A regression test suite is developed incrementally
22
Q

What is regression testing?

A
  • Testing to check that changes in code has not broken previously working code
  • Can be expensive with a manual testing process
  • More simple with automated testing (each time a change is made, tests are rerun)
  • Tests must be successful before change is committed
23
Q

What is release testing?

A
  • Testing a particular release of system outside development team
  • Convince supplier that it meets functionality, performance, dependability goals
  • While system testing focuses on bugs (defect testing), release testing focuses on requirements being met (validation testing)
24
Q

What is performance testing?

A
  • Test emergent properties of system, e.g. performance, reliability
  • Test while slowly increasing load and find limits of system to identify reasons for failure (stress testing)
25
Q

What is user testing?

A
  • User or customer is testing
  • User’s working environment can effect on reliability, performance, usability
  • Hard to test user environments and behaviour
26
Q

What are the types of user testing?

A

Alpha testing
- Users work with development at development site

Beta testing
- A release of software is made available to users to experiment with and raise problems

Acceptance testing
- Customers test a system to decide whether or not it should be accepted and deployed

27
Q

Describe acceptance testing with agile methods.

A
  • User is part of the development team and deciding acceptability of the system
  • Tests defined by user are integrated with other tests
  • No separate acceptance testing process
  • User representative must represent different behaviours, proficiencies of wide range of users
28
Q

What are the best practices in agile testing?

A
  • Continuous testing and feedback
  • Involvement of whole team
  • Test-driven development
  • Customer satisfaction is the primary concern
  • Exploratory testing
29
Q

How do we test in production?

A
  • Test in a live environment after software is deployed
  • Ideally used with smaller and frequent deployments
  • Features can be turned on/off to see how the rest of the system copes
  • Attention to customer experience is important
30
Q

What are the costs of testing?

A
  • Cost of fixing errors rises through successive phases of development process
  • Continuous testing allows errors to be caught early, reducing costs of fixing them
  • A system should have a suite of tests at different granularities
  • Automate as much as possible

Test early, test often