Week 8 Software Testing Flashcards

1
Q

Why is software testing important?

A

Software is deeply integrated into our society, and is often an element of critical or costly systems. If the software running these systems is flawed, failure may resulting in massive causalities, economic loss and destruction of the environment.

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

What happened with Mars climate orbiter?

A

Imperial to metric conversion was not properly implemented, caused crash.

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

What happened with Therac-25?

A

Race condition caused radiation overdose and death.

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

What happened with Ariane 5

A

Floating point to integer overflow caused by reused code from previous generation. 370 million cost.

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

What are the most common quality assurance methods.

A

Review and inspection of software.

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

What is testing vs debugging?

A

Testing detects/reveals errors, whilst debugging is for diagnosing/correcting the root cause of identified errors.

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

Can testing completely fix errors?

A

No, testing can never completely prove the absence of errors, testing alone doesn’t improve software quality.

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

How should you approach testing?

A

You must assume there are errors or flaws within the software system.

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

What are the 3 Test adequacy Criteria?

A

Test generation, Test selection and Test prioritisation

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

What is poor test generation?

A

Amount of tests is inadequate.

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

What is test selection?

A

Excessive testing and redundant tests create QA overhead. We need to be selective with what we test.

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

What is Test prioritisation?

A

We cannot possibly always run all important tests, sometimes release cycle means that we must select only the most critical tests.

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

What are the 5 main types of testing in order?

A
  1. Unit testing.
  2. Component testing
  3. Integration testing
  4. System testing
  5. Regression testing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does unit testing execute?

A

Complete classes, routines or small programs. With testing stubs or drivers.

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

What is Unit testing?

A

Is primarily performed by developers, it is a form of white box testing. You want to ensure that execution of the program matches the specification provided.

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

What is component testing?

A

Component testing is not concerned with the execution of the program. It is primarily performed by testers as a black box test. Component testing tests if the software fulfils the feature level requirements.

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

What does unit testing execute?

A

Complete classes, routines or small programs. With testing stubs or drivers.

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

What does component testing execute?

A

Execution of classes, package, small programs or other elements where testing stubs or drivers are replaced with real objects.

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

What is Integration testing?

A

When components of a system are integrated with eachother, how they interact and work together is tested.
(How do they interact and how does data flow)

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

What is system testing?

A

Once all the components (including external software/hardware) have been integrated into the software’s final configuration, the execution and operation of the unified system is tested.

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

What is regression testing?

A

Repetition of previously performed tests in order to uncover defects.

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

What are the four stages of system testing?

A

Functional testing (functional requirements), quality testing (non-functional requirements), acceptance testing(Customer verifies all requirements) and installation testing (testing in user environment).

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

What is black box testing? How is it done?

A

Tests where the tests cannot see internals of the executed item.
Uses:
- Equivalence class partitioning (ECP)
- Boundary value analysis (BVA)

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

What is white box testing? What does it use?

A

Tests where the tester is aware of the inner workings of the tested item.
- Utilises code coverage

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

What is code coverage?

A

Code coverage basically tells you how much of your code is covered under tests. For example, if you have 90% code coverage, it means 10% of the code is not covered under tests. It is a measurement of how many lines/branches of your program execute during testing.

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

What is Equivalence Class Partitioning? (ECP)

A

You divide the input of a component into multiple classes and select only one input from each class. Assumes homogeneity (Meaning inputs from the same EC cause similar behaviours)

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

What is Boundary Value Analysis (BVA)

A

Select corner courses and see if the component will continue to hold up. Enter invalid values and try to break the component.

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

What are the benefits of ECP?

A

Test reduction without losing test coverage.

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

What is test coverage based on?

What is it closely related too?

A

Based on:

  • The functional specification (blackbox)
  • Internal program structure (white-box)
  • Closely related to test acceleration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is three factors of testing coverage from a whitebox perspective

A
  1. Statement coverage
  2. Branch coverage
  3. Path coverage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What is statement coverage?

A

Has each statement been executed

32
Q

What is branch coverage

A

Has each control structure evaluated to both true and false?

33
Q

Path coverage?

A

Has every single possible route for execution been taken?

34
Q

What are exercised branches, statements, and paths?

A

Actual statements, branches or paths composed of.
Statements: Individual lines
Branches: A collection branches. (static)
Paths: A set of branches, (dynamic)

35
Q

What are exercised branches, statements, and paths?

A

Actual statements, branches or paths composed of.
Statements: Individual lines
Branches: A collection branches. (static)
Paths: A set of branches, (dynamic)

36
Q

What is a CFG

A

A control flow graph. This graph is based on source code and describes the order in which individual statements/instructions/ function calls are executed or evaluated.

37
Q

What are the elements of a GFG

A
  1. Basic blocks: (A sequence of consecutive statements with no branching.
  2. Nodes: Statements or sequences of statements. Or predicate nodes
  3. Edges: Transfer of control (branching)
  4. Sometimes CFG have branch predicates
38
Q

What are the two main type of nodes in CFG’s?

A

Statement Nodes: A group of statements without branching. Predicate nodes: Represent conditions for branching. Statement

39
Q

How to make CFG’s easier to read.

A

Condense multiple statements into a single node. Write the predicate which is true for that branch on the edge.

40
Q

How are loops written in CFG?

A

With a line going back to an earlier node.

41
Q

What is Node coverage, test coverage, edge coverage? Do you use set notation for this?

A

Yes use set notation.
Node coverage: Which nodes were covered by a test path
Edge coverage: Which edges were covered by a test path.
Path coverage: All the nodes/edges in order that were covered in a test pass.

42
Q

What are the things to consider regarding coverage?

A

Coverage is the ratio between covered entitities (statements,branchs,paths)
and total entitites.
Not good for complex systems (AI) or SOA.

43
Q

What is relative coverage?

A

A solution to the issues of traditional coverage, focused on the ratio of covered entities to target entities.

44
Q

What are the 3 types of integration testing?

A
  1. Functional decomposition
  2. Based on a call graph (pair-wise, neighbour)
  3. Based on paths (mm path) between modules.
45
Q

What is Functional decomposition?

A

Functional decomposition is a method of breaking down a problem into several discrete task units or function. These can be run either sequentially in a call reply manner or simultaneously on different processors.

46
Q

When is functional decomposition used?

A

During planning, analysis and design phases.

47
Q

What does functional decomposition illuminate?

A

The functional hierarchy of a software system.

48
Q

What is a stub?

A

Stubs are the modules that act as temporary replacement for a called module and give the same output as that of the actual product.

49
Q

What is top down integration?

A

An integration strategy focused on testing the top layer or controlling subsystem first (the root of the call tree).

50
Q

What is the process for top down integration

A
  • Gradually add more subsystems that are required by the by already tested subsystems.
  • Repeat until all subsystems incorporated into the test.
51
Q

What are problems with stubs?

A
  • Difficult to create when parameters complex, stubs must allow all possible conditions to be tested.
  • May need many stubs.
52
Q

What is modified top down integration?

A

-Modified top down integration.
-Test each layer of the system decomposition individually before merging layers.
Solves stub issues.
-Requires both stubs and Drivers

53
Q

What is bottom up integration?

A
  • Integration testing strategy focused on testing the units at the lowest levels first.
  • Gradually include the subsystems that reference/require previously tested subsystems.
  • Requires driver code
  • Generally last layer tested is UI, not good.
54
Q

What is a driver and what is it used in?

A

A driver code is used in bottom up integration. It is a fake routine that requires a subsystem and passes a test case to it.

55
Q

What are the pros and cons of bottom up integration?

A
  • More useful for OO systems.
  • Drivers may be more complicated
  • UI is done last
56
Q

What kind of functional system testing is done?

A

-Regression testing or smoke testing.

57
Q

What kind of non-functional system testing is done

A
  • Stress testing

- Security testing

58
Q

What is Regression testing (Retesting)

A

After introducing a change, you want to make sure it still passes the same tests from before the test.

59
Q

What are pros of regression testing.

A
  • Hidden old bugs discovered

- Ensures forward progress, no regression of software.

60
Q

What regression test selection methodology?

A

Find the coverage matrix for T, then test the delta between version P and P’. This saves a massive amount of testing.

61
Q

What is Regression test prioritization methodology.

A

Following regression test selection, rank tests by priority. Focuses on the most performing the most valuable tests first.

62
Q

What is smoke testing?

A

A smoke test utilises a subset of all test cases and is a preliminary form of testing.
Smoke testing checks the core functionality of a program, to ensure that the program is ready for further testing. This prevents a QA team from attempting to run a full test of software that can’t complete basic functions.

63
Q

What is User Acceptance testing?

A

The final phase of the software testing process. The software must be tested by actual software users for real life scenarios.

64
Q

What are methodologies for Usability/Acceptance testing.

A
  1. Automated UI testing(Selenium)
  2. Manual Testing
  3. Ad Hoc testing
65
Q

What is Chaos monkey testing?

A
  • Disruptive testing. Forces failure of components to make sure architecture is resilient to real world random outages.
  • Malicious program tramples on components.
66
Q

What is User Acceptance A/B testing.

A

Give users 2 scenarios, then investigate user response to each one/

67
Q

What is User Acceptance A/B testing.

A

Give users 2 scenarios, then investigate user response to each one/

68
Q

What are the 5 key qualities of test automation

A
  1. Must be runnable by script.
  2. Should independently verify results.
  3. Should be repeatable.
  4. Should be robust. (failure points to a bug)
  5. Should be fast
69
Q

What is the goal of a test plan

A

To establish the list of tasks which if performed will identify all the requirements not met within the software.

70
Q

What is a test plan responsible for?

A
  1. Documenting the approach towards testing.

2. Communicate how tests will be organised and testers needs.

71
Q

What is the software testing strategy?

A
  • Determine what components within scope.
  • Decide what tests you want to do?
  • Logistics, who and when will test?
  • Test criteria, suspension/exit criteria.
  • Resource planning, human resources, testers, servers.
  • Plan the test environment.
  • Schedule (estimate man hours)
  • Test deliverables
72
Q

What is suspension criteria?

A

If the suspension criteria are met, we should not test anymore and ask the developer to fix the issue.

73
Q

What is a test case?

A

It’s the description of a specific interaction between the tester and the system, in order to test a single behavior.

74
Q

How are test cases laid out in papers? What do they include.

A

Very similar to use cases, the

  1. Unique name and number
  2. Requirement being exercised.
  3. Precondition of the software before the testcase.
  4. Steps.
  5. Expected result
75
Q

What is the theory on the best test selection

A

Path coverage alone is not good enough, must cover with different conditions.

76
Q

How are defects tracked in software projects?

A
  • Every defect is recorded, and entered into a DTS for prioritisation and review.
  • This process between stakeholders i called triage.