0
0
Testing Fundamentalstesting~20 mins

Building a testing portfolio in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Testing Portfolio Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Key Elements of a Testing Portfolio

Which of the following is NOT typically included in a strong software testing portfolio?

AScreenshots or videos demonstrating test cases
BPersonal opinions about the software's design aesthetics
CDetailed bug reports with clear reproduction steps
DTest plans and test case documentation
Attempts:
2 left
💡 Hint

Think about what helps show your testing skills clearly and professionally.

Predict Output
intermediate
1:30remaining
Test Report Summary Output

What will be the output of this simple test report summary code snippet?

Testing Fundamentals
test_results = {'passed': 8, 'failed': 2, 'skipped': 1}
summary = f"Passed: {test_results['passed']}, Failed: {test_results['failed']}, Skipped: {test_results['skipped']}"
print(summary)
APassed: 8, Failed: 2, Skipped: 1
BError: KeyError
CPassed: 8, Failed: 2, Skipped:
DPassed: 8 Failed: 2 Skipped: 1
Attempts:
2 left
💡 Hint

Look carefully at how the dictionary keys are accessed inside the f-string.

assertion
advanced
1:30remaining
Valid Assertion for Test Case Result

Which assertion correctly verifies that the variable test_passed is True in a Python test?

Testing Fundamentals
test_passed = True
Aassert test_passed is True
Bassert test_passed = True
Cassert test_passed == True
Dassert test_passed != False
Attempts:
2 left
💡 Hint

Remember the difference between equality and identity in Python assertions.

🔧 Debug
advanced
2:00remaining
Identify the Bug in Locator Usage

Given this Selenium locator code snippet, what is the bug that will cause the test to fail?

Testing Fundamentals
element = driver.find_element(By.ID, 'submit-button')
element.click()
AIncorrect locator type; should use <code>By.CLASS_NAME</code>
BUsing <code>find_element</code> instead of <code>find_elements</code>
CMissing import for <code>By</code> from Selenium
DClick method is deprecated and should not be used
Attempts:
2 left
💡 Hint

Check if all required modules are imported before usage.

framework
expert
3:00remaining
Test Execution Order in Pytest Fixtures

Consider these pytest fixtures and test functions. What is the order of execution of the print statements when running test_example?

Testing Fundamentals
import pytest

@pytest.fixture(scope='module')
def setup_module():
    print('Setup Module')
    yield
    print('Teardown Module')

@pytest.fixture(scope='function')
def setup_function():
    print('Setup Function')
    yield
    print('Teardown Function')

def test_example(setup_module, setup_function):
    print('Executing Test')
A
Setup Function
Executing Test
Teardown Function
Setup Module
Teardown Module
B
Setup Function
Setup Module
Executing Test
Teardown Module
Teardown Function
C
Setup Module
Executing Test
Setup Function
Teardown Function
Teardown Module
D
Setup Module
Setup Function
Executing Test
Teardown Function
Teardown Module
Attempts:
2 left
💡 Hint

Remember that module-scoped fixtures run once per module, function-scoped fixtures run per test function.