0
0
Testing Fundamentalstesting~20 mins

Root cause analysis in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Root Cause Analysis Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Identifying the root cause in a bug report

You receive a bug report stating that the login button does not respond when clicked on the homepage. Which of the following is the most likely root cause?

AThe user forgot their password and cannot log in.
BThe button's click event handler is not attached properly in the code.
CThe server is down and cannot process login requests.
DThe homepage background color is not displaying correctly.
Attempts:
2 left
💡 Hint

Think about what directly affects the button's ability to respond to clicks.

Predict Output
intermediate
2:00remaining
Output of root cause analysis log filtering

Given the following log entries, what will be the output after filtering only error-level logs?

Testing Fundamentals
logs = [
  {'level': 'info', 'message': 'User logged in'},
  {'level': 'error', 'message': 'Null pointer exception'},
  {'level': 'warning', 'message': 'Low disk space'},
  {'level': 'error', 'message': 'Timeout error'}
]

error_logs = [log['message'] for log in logs if log['level'] == 'error']
print(error_logs)
A[]
B['User logged in', 'Low disk space']
C['Null pointer exception']
D['Null pointer exception', 'Timeout error']
Attempts:
2 left
💡 Hint

Filter logs where level equals 'error'.

assertion
advanced
2:00remaining
Assertion to verify root cause fix in test automation

Which assertion correctly verifies that a bug causing a crash on clicking 'Submit' is fixed by checking the page does not crash?

Testing Fundamentals
def test_submit_button_does_not_crash(driver):
    driver.get('http://example.com/form')
    submit_button = driver.find_element('id', 'submit')
    submit_button.click()
    # Which assertion below is correct?
Aassert submit_button.is_displayed()
Bassert driver.current_url == 'http://example.com/form'
Cassert 'Error' not in driver.page_source
Dassert driver.find_element('id', 'error-message').is_displayed()
Attempts:
2 left
💡 Hint

Check that no error text appears after clicking submit.

🔧 Debug
advanced
2:00remaining
Debugging flaky test due to timing issue

A test intermittently fails because it tries to click a button before it is clickable. Which fix will most reliably solve this root cause?

AUse an explicit wait to wait until the button is clickable before clicking.
BAdd a fixed sleep of 5 seconds before clicking the button.
CRemove the click action from the test to avoid failure.
DClick the button twice quickly to ensure it registers.
Attempts:
2 left
💡 Hint

Waiting dynamically for the button state is better than fixed delays.

framework
expert
3:00remaining
Root cause analysis integration in CI pipeline

In a CI pipeline, which approach best helps identify the root cause of a failing test suite after a new code push?

ACollect detailed test failure logs and screenshots, then analyze failure patterns over time.
BOnly run unit tests and skip integration tests to reduce failures.
CIgnore flaky tests and rerun the pipeline until it passes.
DRun all tests in parallel without logs to save time.
Attempts:
2 left
💡 Hint

Detailed logs and historical data help find root causes effectively.