Chapter 4 Flashcards

1
Q

What are the 3 test techniques?

A

Black-box, white-box, and experience-based

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

Define: Black-box

A

(also known as specification-based techniques) are based on an analysis of the specified behavior of the test object without reference to its internal structure. Therefore, the test cases are independent of how the software is implemented. Consequently, if the implementation changes, but the required behavior stays the same, then the test cases are still useful.

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

Define: White-box

A

(also known as structure-based techniques) are based on an analysis of the test object’s internal structure and processing. As the test cases are dependent on how the software is designed, they can only be created after the design or implementation of the test object.

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

Define: Experience-based

A

effectively use the knowledge and experience of testers for the design and implementation of test cases. The effectiveness of these techniques depends heavily on the tester’s skills. Experience-based test techniques can detect defects that may be missed using the black- box and white-box test techniques. Hence, experience-based test techniques are complementary to the black-box and white-box test techniques.

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

What are the 4 techniques used in Black-box?

A
  • Equivalence Partitioning
  • Boundary Value Analysis
  • Decision Table Testing
  • State Transition Testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Boundary Value Analysis?

A

(BVA) is a technique based on exercising the boundaries of equivalence partitions. Therefore, BVA can only be used for ordered partitions. The minimum and maximum values of a partition are its boundary values. In the case of BVA, if two elements belong to the same partition, all elements between them must also belong to that partition.
BVA focuses on the boundary values of the partitions because developers are more likely to make errors with these boundary values. Typical defects found by BVA are located where implemented boundaries are misplaced to positions above or below their intended positions or are omitted altogether.

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

What is Equivalence Partitioning?

A

(EP) divides data into partitions (known as equivalence partitions) based on the expectation that all the elements of a given partition are to be processed in the same way by the test object. The theory behind this technique is that if a test case, that tests one value from an equivalence partition, detects a defect, this defect should also be detected by test cases that test any other value from the same partition. Therefore, one test for each partition is sufficient.
Equivalence partitions can be identified for any data element related to the test object, including inputs, outputs, configuration items, internal values, time-related values, and interface parameters. The partitions may be continuous or discrete, ordered or unordered, finite or infinite. The partitions must not overlap and must be non-empty sets.
For simple test objects EP can be easy, but in practice, understanding how the test object will treat different values is often complicated.

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

What are the 2 kinds of BVA?

A

2-value and 3-value

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

What is 2-value BVA?

A

for each boundary value there are two coverage items: this boundary value and its closest neighbor belonging to the adjacent partition. To achieve 100% coverage with 2-value BVA, test cases must exercise all coverage items, i.e., all identified boundary values. Coverage is measured as the number of boundary values that were exercised, divided by the total number of identified boundary values, and is expressed as a percentage.

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

What is 3-value BVA?

A

for each boundary value there are three coverage items: this boundary value and both its neighbors. Therefore, in 3-value BVA some of the coverage items may not be boundary values. To achieve 100% coverage with 3-value BVA, test cases must exercise all coverage items, i.e., identified boundary values and their neighbors. Coverage is measured as the number of boundary values and their neighbors exercised, divided by the total number of identified boundary values and their neighbors, and is expressed as a percentage.
3-value BVA is more rigorous than 2-value BVA as it may detect defects overlooked by 2-value BVA. For example, if the decision “if (x ≤ 10) …” is incorrectly implemented as “if (x = 10) …”, no test data derived from the 2-value BVA (x = 10, x = 11) can detect the defect. However, x = 9, derived from the 3-value BVA, is likely to detect it.

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

What is Decision Table Testing?

A

Decision tables are used for testing the implementation of system requirements that specify how different combinations of conditions result in different outcomes. Decision tables are an effective way of recording complex logic, such as business rules.
When creating decision tables, the conditions and the resulting actions of the system are defined. These form the rows of the table. Each column corresponds to a decision rule that defines a unique combination of conditions, along with the associated actions. In limited-entry decision tables all the values of the conditions and actions (except for irrelevant or infeasible ones; see below) are shown as Boolean values (true or false). Alternatively, in extended-entry decision tables some or all the conditions and actions may also take on multiple values (e.g., ranges of numbers, equivalence partitions, discrete values).

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

What is State Transition Testing?

A

A state transition diagram models the behavior of a system by showing its possible states and valid state transitions. A transition is initiated by an event, which may be additionally qualified by a guard condition. The transitions are assumed to be instantaneous and may sometimes result in the software taking action. The common transition labeling syntax is as follows: “event [guard condition] / action”. Guard conditions and actions can be omitted if they do not exist or are irrelevant for the tester.
A state table is a model equivalent to a state transition diagram. Its rows represent states, and its columns represent events (together with guard conditions if they exist). Table entries (cells) represent transitions, and contain the target state, as well as the resulting actions, if defined. In contrast to the state transition diagram, the state table explicitly shows invalid transitions, which are represented by empty cells.

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

What are the 3 coverage criteria for State Transition Testing?

A

-All States
-Valid Transitions
-All Transitions

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

What is All States Coverage?

A

the coverage items are the states. To achieve 100% all states coverage, test cases must ensure that all the states are visited. Coverage is measured as the number of visited states divided by the total number of states, and is expressed as a percentage

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

What is Valid Transitions Coverage?

A

(also called 0-switch coverage), the coverage items are single valid transitions. To achieve 100% valid transitions coverage, test cases must exercise all the valid transitions. Coverage is measured as the number of exercised valid transitions divided by the total number of valid transitions, and is expressed as a percentage.

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

What is All Transitions Coverage?

A

the coverage items are all the transitions shown in a state table. To achieve 100% all transitions coverage, test cases must exercise all the valid transitions and attempt to execute invalid transitions. Testing only one invalid transition in a single test case helps to avoid fault masking, i.e., a situation in which one defect prevents the detection of another. Coverage is measured as the number of valid and invalid transitions exercised or attempted to be covered by executed test cases, divided by the total number of valid and invalid transitions, and is expressed as a percentage.

17
Q

What are 2 White-box test techniques?

A

Statement and Branch

18
Q

What is Statement testing?

A

the coverage items are executable statements. The aim is to design test cases that exercise statements in the code until an acceptable level of coverage is achieved. Coverage is measured as the number of statements exercised by the test cases divided by the total number of executable statements in the code, and is expressed as a percentage.
When 100% statement coverage is achieved, it ensures that all executable statements in the code have been exercised at least once. In particular, this means that each statement with a defect will be executed, which may cause a failure demonstrating the presence of the defect. However, exercising a statement with a test case will not detect defects in all cases. For example, it may not detect defects that are data dependent (e.g., a division by zero that only fails when a denominator is set to zero). Also, 100% statement coverage does not ensure that all the decision logic has been tested as, for instance, it may not exercise all the branches in the code.

19
Q

What is Branch Testing?

A

In branch testing the coverage items are branches and the aim is to design test cases to exercise branches in the code until an acceptable level of coverage is achieved. Coverage is measured as the number of branches exercised by the test cases divided by the total number of branches, and is expressed as a percentage.
When 100% branch coverage is achieved, all branches in the code, unconditional and conditional, are exercised by test cases. Conditional branches typically correspond to a true or false outcome from an “if…then” decision, an outcome from a switch/case statement, or a decision to exit or continue in a loop. However, exercising a branch with a test case will not detect defects in all cases. For example, it may not detect defects requiring the execution of a specific path in a code.
Branch coverage subsumes statement coverage. This means that any set of test cases achieving 100% branch coverage also achieves 100% statement coverage (but not vice versa).

20
Q

What is a Strength and Weakness in White-box testing?

A

Strength: The entire software implementation is taken into account during testing, which facilitates defect detection even when the software specification is vague, outdated or incomplete.
Weakness: if the software does not implement one or more requirements, white box testing may not detect the resulting defects of omission.

21
Q

Why is White Box used for testing code?

A

White-box techniques can be used in static testing (e.g., during dry runs of code). They are well suited to reviewing code that is not yet ready for execution, as well as pseudocode and other high- level or top-down logic which can be modeled with a control flow graph.
Performing only black-box testing does not provide a measure of actual code coverage. White-box coverage measures provide an objective measurement of coverage and provide the necessary information to allow additional tests to be generated to increase this coverage, and subsequently increase confidence in the code.

21
Q

What are 3 experience-based test techniques?

A
  • Error guessing
  • Exploratory testing
  • Checklist-based testing
22
Q

What is Error Guessing?

A

Error guessing is a technique used to anticipate the occurrence of errors, defects, and failures, based on the tester’s knowledge.
* How the application has worked in the past
* The types of errors the developers tend to make and the types of defects that result from these errors
* The types of failures that have occurred in other, similar applications

22
Q

What is Checklist-based testing?

A

In checklist-based testing, a tester designs, implements, and executes tests to cover test conditions from a checklist. Checklists can be built based on experience, knowledge about what is important for the user, or an understanding of why and how software fails. Checklists should not contain items that can be checked automatically, items better suited as entry/exit criteria, or items that are too general.
Checklist items are often phrased in the form of a question. It should be possible to check each item separately and directly. These items may refer to requirements, graphical interface properties, quality characteristics or other forms of test conditions. Checklists can be created to support various test types, including functional and non-functional testing.

23
Q

What is Exploratory testing?

A

tests are simultaneously designed, executed, and evaluated while the tester learns about the test object. The testing is used to learn more about the test object, to explore it more deeply with focused tests, and to create tests for untested areas.
Exploratory testing is useful when there are few or inadequate specifications or there is significant time pressure on the testing. Exploratory testing is also useful to complement other more formal test techniques. Exploratory testing will be more effective if the tester is experienced, has domain knowledge and has a high degree of essential skills, like analytical skills, curiosity and creativeness

24
Q

What are common errors?

A

In general, errors, defects and failures may be related to: input (e.g., correct input not accepted, parameters wrong or missing), output (e.g., wrong format, wrong result), logic (e.g., missing cases, wrong operator), computation (e.g., incorrect operand, wrong computation), interfaces (e.g., parameter mismatch, incompatible types), or data (e.g., incorrect initialization, wrong type).

25
Q

What are Fault Attacks?

A

A methodical approach to the implementation of error guessing. This technique requires the tester to create or acquire a list of possible errors, defects and failures, and to design tests that will identify defects associated with the errors, expose the defects, or cause the failures. These lists can be built based on experience, defect and failure data, or from common knowledge about why software fails.

26
Q

What are the 3 critical aspects of User Stories?

A
  • Card – the medium describing a user story (e.g., an index card, an entry in an electronic board)
  • Conversation – explains how the software will be used (can be documented or verbal)
  • Confirmation – the acceptance criteria
26
Q

What is Collaboration-based Test Approaches?

A

Each of the above-mentioned techniques has a particular objective with respect to defect detection. Collaboration-based approaches, on the other hand, focus also on defect avoidance by collaboration and communication.

26
Q

What is Collaborative User Story Writing?

A

A user story represents a feature that will be valuable to either a user or purchaser of a system or software

27
Q

What is the most common format for a user story?

A

“As a [role], I want [goal to be accomplished], so that I can [resulting business value for the role]”, followed by the acceptance criteria.

28
Q

What is a GOOD user story?

A

Independent, Negotiable, Valuable, Estimable, Small and Testable (INVEST). If a stakeholder does not know how to test a user story, this may indicate that the user story is not clear enough, or that it does not reflect something valuable to them, or that the stakeholder just needs help in testing.

29
Q

What are Acceptance Criteria used for?

A
  • Define the scope of the user story
  • Reach consensus among the stakeholders
  • Describe both positive and negative scenarios
  • Serve as a basis for the user story acceptance testing
  • Allow accurate planning and estimation
29
Q

What is Acceptance Criteria?

A

Acceptance criteria for a user story are the conditions that an implementation of the user story must meet to be accepted by stakeholders. From this perspective, acceptance criteria may be viewed as the test conditions that should be exercised by the tests. Acceptance criteria are usually a result of the Conversation

29
Q

What are the 2 most common ways to write acceptance criteria?

A

Scenario-oriented and Rule-oriented

30
Q

What is Acceptance Test-driven Development (ATDD)?

A

ATDD is a test-first approach. Test cases are created prior to implementing the user story. The test cases are created by team members with different perspectives, e.g., customers, developers, and testers. Test cases may be executed manually or automated.