0
0
Testing Fundamentalstesting~20 mins

Transitioning to automation in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Automation Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why automate regression tests?

Imagine you have a website that changes often. You run the same tests every time to check if old features still work. Why is automating these regression tests helpful?

AIt makes tests more creative and changes test cases automatically.
BIt saves time by running tests automatically and quickly after each change.
CIt removes the need for any manual testing forever.
DIt guarantees the software has no bugs at all.
Attempts:
2 left
💡 Hint

Think about repetitive tasks and how machines can help.

Predict Output
intermediate
2:00remaining
Output of a simple automated test script

What will be the output of this Python test code snippet?

Testing Fundamentals
def test_sum():
    assert 2 + 2 == 4
    assert 3 + 3 == 6

try:
    test_sum()
    print('Test Passed')
except AssertionError:
    print('Test Failed')
ATest Passed
BTest Failed
CSyntaxError
DNo output
Attempts:
2 left
💡 Hint

Check if all assertions are true.

assertion
advanced
2:00remaining
Choosing the correct assertion for UI element visibility

You want to check if a button with id 'submit-btn' is visible on the page using an automated test. Which assertion is best?

Aassert element is not None
Bassert element.text == 'Submit'
Cassert element.get_attribute('disabled') == 'false'
Dassert element.is_displayed() == True
Attempts:
2 left
💡 Hint

Visibility means the element can be seen and interacted with.

🔧 Debug
advanced
2:00remaining
Debugging a flaky automated test

An automated test sometimes fails because it tries to click a button before it appears. What is the best way to fix this?

ARemove the click step to avoid failure.
BRun the test multiple times until it passes.
CAdd a wait that pauses the test until the button is visible before clicking.
DChange the button's id in the code.
Attempts:
2 left
💡 Hint

Think about waiting for elements in automation.

framework
expert
2:00remaining
Selecting the best test framework for cross-browser automation

You need to automate tests that run on Chrome, Firefox, and Safari browsers. Which framework is best suited for this?

ASelenium WebDriver
BJUnit
CPostman
DJest
Attempts:
2 left
💡 Hint

Consider frameworks that support multiple browsers for UI testing.