0
0
Testing Fundamentalstesting~20 mins

Risk analysis for testing in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Risk Analysis Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Identifying High-Risk Areas

In risk analysis for testing, which factor most directly increases the priority of testing a feature?

AThe feature has extensive automated tests already.
BThe feature is rarely used and has simple logic.
CThe feature was recently added but has no known bugs.
DThe feature has a complex design and affects many users.
Attempts:
2 left
💡 Hint

Think about what makes a feature more likely to cause problems if it fails.

Predict Output
intermediate
2:00remaining
Output of Risk Score Calculation

What is the output of the following Python code that calculates a risk score?

Testing Fundamentals
def risk_score(probability, impact):
    return probability * impact

score = risk_score(0.7, 8)
print(score)
A15
B5.6
C0.875
DSyntaxError
Attempts:
2 left
💡 Hint

Multiply the two numbers given as arguments.

assertion
advanced
2:00remaining
Validating Risk Priority Order

You have a list of features with risk scores. Which assertion correctly checks that the list is sorted from highest to lowest risk?

Testing Fundamentals
risk_scores = [9.5, 7.2, 5.6, 3.1]
Aassert risk_scores == sorted(risk_scores)
Bassert all(risk_scores[i] <= risk_scores[i+1] for i in range(len(risk_scores)-1))
Cassert all(risk_scores[i] >= risk_scores[i+1] for i in range(len(risk_scores)-1))
Dassert risk_scores == sorted(risk_scores, reverse=False)
Attempts:
2 left
💡 Hint

Check that each score is greater than or equal to the next.

🔧 Debug
advanced
2:00remaining
Debugging Risk Impact Calculation

Find the error in this code that calculates risk impact but returns wrong results:

Testing Fundamentals
def calculate_impact(severity, frequency):
    impact = severity + frequency
    return impact

result = calculate_impact(5, 3)
print(result)
AThe impact should be multiplied, not added, so use severity * frequency.
BThe function is missing a return statement.
CThe variables severity and frequency are not defined.
DThe print statement is outside the function and causes an error.
Attempts:
2 left
💡 Hint

Risk impact is usually calculated by multiplying severity and frequency.

framework
expert
3:00remaining
Designing a Risk-Based Test Selection Framework

Which approach best fits a risk-based test selection framework to optimize testing effort?

ASelect tests that cover features with the highest risk scores first, then proceed to lower risk features.
BRun all tests equally regardless of risk to ensure full coverage.
CSelect tests randomly to avoid bias in testing.
DOnly test features that have failed before, ignoring new or changed features.
Attempts:
2 left
💡 Hint

Focus testing on areas where failure impact and likelihood are highest.