ISTQB-CTFL Dumps

ISTQB-CTFL Free Practice Test

ISTQB ISTQB-CTFL: ISTQB-Foundation Level Exam

QUESTION 31

For the following pseudo-code determine number of tests required for 100% statement coverage
IF Gender = Boy
If Age > 3 AND Age < 5 xss=removed>ELSE IF Age >=5 AND Age < 7>Shoe Size = 2 ENDIF
ELSE
IF Age > 3 AND Age < 5>Shoe Size = 0
ELSE IF Age >=5 AND Age < 7>Shoe Size = 1 ENDIF ENDIF

Correct Answer: B
To achieve 100% statement coverage, we need to design test cases that ensure every statement in the given pseudo-code is executed at least once. Analyzing the pseudo-code, we notice that there are conditions based on two variables: Gender and Age. To cover all statements, we need to consider the paths that lead to each assignment of the Shoe Size variable.
✑ Gender = Boy, Age <= 3 (Shoe Size assignment is not reached, but the condition is evaluated)
✑ Gender = Boy, Age > 3 AND Age < 5 xss=removed>✑ Gender = Boy, Age >= 5 AND Age < 7 xss=removed>✑ Gender != Boy, Age <= 3 (Again, Shoe Size assignment is not reached, but the condition is evaluated)
✑ Gender != Boy, Age > 3 AND Age < 5 xss=removed>✑ Gender != Boy, Age >= 5 AND Age < 7 xss=removed>However, upon closer inspection, we see that tests 1 and 4 do not contribute to statement coverage as they do not lead to a Shoe Size assignment. Therefore, we only need 4 test cases to achieve 100% statement coverage, making option B the correct answer.

QUESTION 32

What is 'Component Testing'?

Correct Answer: D
Component testing is a test level. A test level is a group of test activities that are organized and managed together based on some common characteristics or objectives. A test level can be defined based on various factors, such as the scope and target of testing, the phase and model of development, the stakeholders and roles involved in testing, etc. Component testing (also known as unit testing or module testing) is a test level that focuses on verifying the functionality and quality of individual software components (such as modules, classes, functions, methods, etc.). Component testing can be performed by developers or testers using various techniques and tools depending on the type and complexity of the components. The other options are not test levels. Integration testing is another test level that focuses on verifying the functionality and quality of groups of software components that interact with each other or with external systems. Functional testing is a type of black-box dynamic testing that verifies that the system under test performs its intended functions according to its requirements or specifications.
Experience-based testing is a category of test design techniques that rely on the tester’s knowledge and intuition to derive and select test cases based on their experience with similar systems, technologies, domains, risks, etc. Verified References: A Study Guide to the ISTQB® Foundation Level 2018 Syllabus - Springer, page 19.

QUESTION 33

Given the following state model of sales order software: SEE ATTACHMENT
Which of the following sequences of tran-sitions provides the highest level of tran-sition
coverage for the model (assuming you can start in any state)?

Correct Answer: B
State transition testing is a black-box testing technique where test cases are designed to cover states and transitions of a state machine.
Given the state model with the following transitions:
✑ PLACED -> IN PRODUCTION
✑ IN PRODUCTION -> CANCELLED
✑ IN PRODUCTION -> SHIPPED
✑ SHIPPED -> INVOICED
✑ INVOICED -> CANCELLED
✑ CANCELLED -> PLACED
To cover all transitions at least once, we need to create a sequence that covers all six transitions.
Option A: IN PRODUCTION -> CANCELLED -> PLACED -> IN PRODUCTION -> CANCELLED -> PLACED- Misses SHIPPED -> INVOICED and INVOICED ->
CANCELLED transitions.
Option B: IN PRODUCTION -> SHIPPED -> INVOICED -> CANCELLED -> PLACED -> IN
PRODUCTION- Covers all transitions.
Option C: PLACED -> IN PRODUCTION -> SHIPPED -> CANCELLED (ISTQB not-for-
profit association) (Udemy)sses INVOICED -> CANCELLED transition.
Option D: PLACED -> CANCELLED -> PLACED -> CANCELLED -> PLACED -> IN PRODUCTION -> CANCELLED- Misses SHIPPED -> INVOICED and INVOICED ->
CANCELLED transitions.
Given these, Option B covers all the transitions6†source9†source. References:
✑ Certified Tester Foundation Level v4.0
✑ 10 Sample Exams ISTQB Foundation Level (CTFL) v4.0

QUESTION 34

Which of the following statements about static analysis are FALSE?

Correct Answer: D
Static analysis involves analyzing the software's code, design, and structure without executing the program. It can uncover various types of defects, including security vulnerabilities (II) and non-conformance to specifications and standards (III). However, static analysis cannot replace dynamic testing (I), which involves executing the software to observe its behavior under various conditions. Dynamic testing can identify failures that static analysis cannot, such as those related to runtime issues and interaction between different parts of the software. Statement IV is false because static analysis does not detect failures; it detects defects. Failures are observed when the software is executed, which is beyond the scope of static analysis.

QUESTION 35

A bank offers a savings account with various interest rates based on the current balance in the account. The balance ranges and respective interest rates are:
Up to $100.00 =2%
$100.01 to $500.00 = 4%
$500.01 to $1,000.00 = 5

Correct Answer: B
Boundary Value Analysis (BVA) is a software testing technique in which tests are designed to include values at the boundaries. The concept is to focus on the boundaries since errors tend to occur at the edges of input ranges rather than in the middle.
Given the problem statement:
✑ Up to $100.00 = 2%
✑ $100.01 to $500.00 = 4%
✑ $500.01 to $1,000.00 = 5%
✑ Above $1,000.00 = 7%
Two-point boundary value analysis means testing the two boundaries of each range. For each range:
✑ The boundaries for "Up to $100.00" would be $100.00 and $100.01.
✑ The boundaries for "$100.01 to $500.00" would be $100.00 and $500.00.
✑ The boundaries for "$500.01 to $1,000.00" would be $500.00 and $1,000.00.
✑ The boundaries for "Above $1,000.00" would be $1,000.00 and $1,000.01. Now, let's examine the options:
✑ A. $5.00, $100.00, $499.99, $1,000.00, $1,000.01
✑ B. $100.00, $100.01, $100.02, $500.00, $999.99
✑ C. $100.00, $500.00, $1,000.00, $1,000.01
✑ D. $5.00, $100.00, $500.00, $1,000.01
Given the options, B provides the highest boundary coverage (ISTQB not-for-profit association) (Udemy).
References:
✑ Certified Tester Foundation Level v4.0
✑ 10 Sample Exams ISTQB Foundation Level (CTFL) v4.0