Tentaplugg Flashcards

1
Q

Define the term test-case and give three of the elements a good test-case must contain

A

Test Case: test case has an identity and is associated with a program behavior. A test case also has a set of inputs and a list of expected outputs.

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

What is the definition of software testing?

A

A process of analyzing a software item to detect the differences between existing and required conditions (that is defects/errors/bugs) and to evaluate the features of the software item.

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

Where is an error made in software testing?

A

An error is made by people. When people create errors while coding, we say that they introduce bugs in the system.

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

What is a fault in software testing?

A

A fault is the result of an error. Could also be called a bug. It is more precise to say that a fault is the representation of an error.

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

What is fault of commission and fault of omission?

A

A fault of commission occurs when we enter something into a representation that is incorrect. Faults of omission occur when we fail to enter correct information. Of these two types, faults of omission are more difficult to detect and resolve.

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

What is a failure in software testing?

A

A failure occurs when a fault executes.

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

What is an incident in software testing?

A

An incident is the symptom associated with a failure that alerts the user to the occurrence of a failure.

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

What is a test in software testing?

A

A test is the act of exercising software with test cases. A test has two distinct goals: to find failures or to demonstrate correct execution.

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

Define functional-based and structural-based testing. Give an example of a testing technique for each of them. What types of faults are these techniques useful at detecting?

A

Functional – based on requirement specification, best at finding omission errors, eg:
equivalence class testing
Structural – based on the implementation of the program, best at finding commission
errors, eg: path coverage

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

State transition testing:
Order the following test coverage criteria for state transition testing from weakest to strongest: event coverage, path coverage, transition coverage, state coverage.
Are all of them always applicable?

A

Event and state < transition < path

Path is not applicable when there are loops

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

What type of systems is state transition testing best suited for?

A

Systems that need to remember previous states

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

What is the forumula for calculating cyclomatic complexiy?

A

E - N + 2*P

E - Edges, N - Nodes, P - Partitions

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

What are the limitations of testing?

A
  • Testing cannot prove correctness
  • Testing can demonstrate the presence of failures
  • Testing cannot prove the absence of failures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain the principles of mutation testing.

A

Mutation testing introduces changes in the code to see if the test suite will detect the mutants and tests the quality of the test suite

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

A good model must be precise and concise. Explain what this means in practice.

A

i. Precise means it accurately represents the system

ii. Concise means it only covers the aspects relevant to the testing goal

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

Give two possible inconveniences of model-based test-case generation over manual test-case generation.

A

i. Requires a different skillset from the testers

ii. Some systems may be too complex to be represented by a model

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

Describe two of the steps involved in model-based testing

A
  1. Model the SUT and/or its environment
  2. Use an existing model or create one for testing
  3. Generate abstract tests from the model
  4. Concretize the abstract tests to make them executable
  5. Execute the tests on the SUT and assign verdicts
  6. Analyze the test results.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Give one advantage and one disadvantage of scripted testing compared to exploratory testing.

A

i. Scripted testing is easy to reproduce

ii. Scripted testing does not allow to change the test process to explore further an interesting fault found

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

Give an advantage of MM-path testing over top-down and bottom-up approaches for integration.

A

No need for stubs and drivers.

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

What are two other kinds of system-level testing apart from functional testing?

A

Acceptance testing and performance testing

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

Name three kinds of system-level testing.

A

Acceptance testing, performance testing and funtional testing.

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

Give two examples of coverage criteria that can be used in a project. For each of them state one limitation.

A

i. Line coverage – is a very weak coverage criteria that will not say much about the quality of the code.
ii. Condition coverage – can result in a very large set of test-cases

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

What is statement coverage good at detecting?

A

i. Dead code
ii. Unused statements
iii. Unused Branches

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

What is decision coverage?

A

You make sure that all possible decisions (if-statements) are executed as both true and false.

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

What is conditional coverage?

A

You make sure that all possible conditions (x > 3, b == 0) are executed as both true and false.

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

What is a fault of commission?

A

A fault of commission occurs when we enter something into a representation that is incorrect
Commission – a floating point representation instead of an integer representation

27
Q

What is a fault of omission?

A

Faults of omission occur when we fail to enter correct information.
Omission – a login feature missing

28
Q

Give examples of 2 artefacts other than code where coverage criteria can be applied.

A

Requirement specification, Design specification

29
Q

Is 100% coverage a guarantee of test suite quality?

A

No, test cases can be chosen with ineffective values, for example really trivial

30
Q

Is it possible to have code for which branch coverage and statement coverage tests are the same?

A

Yes, eg:
if a > 1
then 5
else 6

31
Q

What is scripted testing?

A

Testing performed based on a documented test script created from requirements, design and code
• Allow division of labor
• Tests can be easily understood and repeated
• Easier to automate tests
• Coverage can be easily defined and measured

32
Q

What is exploratory testing and what is it good for?

A

“a type of unscripted experiencebased testing in which the tester spontaneously designs and executes tests based on the tester’s existing
relevant knowledge”

Useful when:
- the next test case cannot be determined in advance and needs to be chosen based on previous experience
- it is necessary to provide rapid feedback on a
products quality
- a defect is detected, to explore the scope and
variations of the defect

33
Q

When is bottom-up testing a good practice?

A
  • If the basic functions are complicated, error-prone or has development risks
  • If bottom-up development strategy is used
  • If there are strict performance or real-time requirements
34
Q

What problems are there with using bottom-up testing?

A
  • Lower level functions are often off-the shelf or trivial
  • Complicated User Interface testing is postponed
  • End-user feed-back postponed
  • Effort to write drivers.
35
Q

When is top-down testing a good practice and what benefits are there to it?

A
  • Test cases are defined for functional requirements of the system
  • Defects in general design can be found early
  • Works well with many incremental development methods
  • No need for drivers
36
Q

What problems are there with using top-down testing?

A
  • Technical details postponed, potential show-stoppers
  • Many stubs are required
  • Stubs with many conditions are hard to write
37
Q

Why is sandwich testing a good practice?

A

Top and Bottom Layer Tests can be done in parallel

38
Q

What problems are there with using sandwich testing?

A
  • Higher cost, different skillsets needed

* Stubs and drivers need to be written

39
Q

Path-based integration:

What is a source node?

A

A source node in a program is a statement
fragment at which program execution begins or
resumes.

40
Q

Path-based integration:

What is a sink node?

A

A sink node in a program is a statement fragment at which program execution halts or terminates.

41
Q
Path-based integration:
What is a module execution path (MEP)?
A
A module execution path (MEP) is a sequence of
statements that begins with a source node and ends with a sink node, with no intervening sink nodes.
42
Q

Path-based integration:

What is a MM-path? What is an important advantage with using MM-paths and thereby path-based integration testing?

A
  • A MM-Path is an interleaved sequence of module execution paths (MEP) and messages.
  • The most important advantage of path-based integration testing is that it is closely coupled with the actual system behavior
43
Q

What are the benefits of model-based testing?

A
  • Effective fault detection
  • Reduced Testing cost and time
  • Improved test quality
  • Traceability
  • Straightforward to link requirements to test cases
  • Detection of requirement defects
44
Q

What are the benefits of test-driven development?

A

+ working code
+ regression testing
+ easy fault isolation
+ test documented code

45
Q

What are the drawbacks of test-driven development?

A
  • code needs to be refactored

- can fail to detect deeper faults

46
Q

When should you stop testing?

A

No single criterion for stopping, but…
– previously defined coverage goals are met
– defect discovery rate has dropped below a
previously defined threshold
– cost of finding “next” defect is higher than
estimated cost of defect
– project team decides to stop testing
– management decides to stop testing
– money/time runs out

47
Q

What is a software defect taxonomy and how does it help in the testing process?

A

A taxonomy is a classification of things into ordered
groups or categories that indicate natural hierarchical
relationships.
- Guide the test case design
- Understand the defects better
- Help determine coverage that test-cases are providing

48
Q

What is a schedule and a charter in exploratory testing?

A

Schedule: An uninterrupted block of time devoted to
testing
Charter: a guide defined before the testing session covering:
- what to test
- available documentation
- test tactics
- risks involved

49
Q

What are the limitations to exploratory testing?

A
  • Does not prevent defects
  • Incompatible with agile development
  • Does not detect omission errors
  • Can focus excessively on a particular area
  • Hard to know when to stop testing
50
Q

What is a driver in software testing?

A

A pretend module that requires a sub-system and passes a test case to it.

51
Q

What is a stub in software testing?

A

A program or a method that simulates the inputoutput functionality of a missing sub-system by answering to the decomposition sequence of the calling sub-system and returning back simulated or ”canned” data.

52
Q

What is the general formula to calculate # of drivers and # of sessions in bottom-up testing?

A

General formula:
Number of drivers: (nodes-leaves)
Number of sessions: (nodes-leaves)+edges

53
Q

What is the general formula to calculate # of drivers and # of sessions in top-down testing?

A

General formula:
Number of stubs: (nodes – 1)
Number of sessions: (nodes-leaves)+edges

54
Q

What are the disadvantages of Big-Bang Testing?

A
  • Defects present at the interfaces of components are identified at very late stage as all components are integrated in one shot.
  • It is very difficult to isolate the defects found.
55
Q

What two types of tests can you perform when using Call graph-based integration testing?

A

Two types of tests:
– Pair-wise integration testing
– Neighborhood integration testing

56
Q

What are the Pros and Cons of Call-Graph Integration?

A

+ Aim to eliminate / reduce the need for drivers / stubs
+ Closer to a build sequence
+ Neighborhoods can be combined to create “villages”
- Development effort is a drawback
- Suffer from fault isolation problems
- Specially for large neighborhoods

57
Q

What is reference testing?

A

Reference testing – running tests against a manually

verified initial run.

58
Q

What are the limitations of automated software testing?

A
  • Does not replace manual testing
  • Not all tests should be automated
  • Does not improve effectiveness
  • May limit software development
59
Q

What are the criteria for a good model for testing? Explain!

A

It should be precise and concise.

  • Precise means it accurately represents the system
  • Concise means it only covers the aspects relevant to the testing goal
60
Q

What is an Atomic System Function (ASF)?

A

An Atomic System Function(ASF) is an action that is
observable at the system level in terms of port input
and output events.

61
Q

What are test case design techniques for Black-Box testing (requirement based)?

A
  • Boundary Value Analysis (BVA)
  • Equivalence Partitioning (EP)
  • Decision Table Testing
  • State Transition Diagrams
  • Use Case Testing
62
Q

What are test case design techniques for White-Box testing (structure based)?

A
  • Statement Coverage
  • Branch Coverage
  • Path Coverage
  • Decision Coverage
  • Condition Coverage
  • Multiple Condition Coverage
63
Q

What is a use-case?

A

A use case is a scenario that describes the use of a system by an actor to accomplish a specific goal.

64
Q

What is an “actor” and a “scenario” when talking about use-cases?

A
  • An “actor” is a user, playing a role with respect to the system, seeking to use the system to accomplish something worthwhile within a particular context.
  • A scenario is a sequence of steps that describe the interactions between the actor and the system.