Bird
Raised Fist0
Testing Fundamentalstesting~20 mins

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

Choose your learning style10 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.

Practice

(1/5)
1. What is the main purpose of a testing portfolio?
easy
A. To showcase your testing skills and experience
B. To store all your personal documents
C. To write code for software development
D. To manage project deadlines

Solution

  1. Step 1: Understand the role of a testing portfolio

    A testing portfolio is a collection of your work that shows your skills in software testing.
  2. Step 2: Identify the correct purpose

    It is used to prove your testing abilities to employers or clients, not for unrelated tasks like storing personal documents or managing deadlines.
  3. Final Answer:

    To showcase your testing skills and experience -> Option A
  4. Quick Check:

    Testing portfolio = showcase skills [OK]
Hint: Think: What would impress a hiring manager? [OK]
Common Mistakes:
  • Confusing portfolio with personal file storage
  • Thinking it's for coding instead of testing
  • Mixing portfolio with project management tools
2. Which of the following is the correct way to organize test cases in a portfolio?
easy
A. Random order based on when they were written
B. Grouped by feature or functionality tested
C. Only include failed test cases
D. Mix test cases with unrelated documents

Solution

  1. Step 1: Understand organization best practices

    Organizing test cases by feature or functionality helps reviewers find relevant tests easily.
  2. Step 2: Eliminate poor organization methods

    Random order or mixing with unrelated documents makes the portfolio confusing. Including only failed tests is incomplete.
  3. Final Answer:

    Grouped by feature or functionality tested -> Option B
  4. Quick Check:

    Organize by feature = clear portfolio [OK]
Hint: Group similar tests together for clarity [OK]
Common Mistakes:
  • Leaving test cases unordered
  • Including only failed tests
  • Mixing unrelated files with test cases
3. Consider this snippet from a testing portfolio README:
Test Cases Included:
- Login Functionality
- Payment Processing
- User Profile Update

Bug Reports:
- Bug #101: Login fails on invalid password
- Bug #102: Payment gateway timeout

Automation Scripts:
- login_test.py
- payment_test.py
What will a reviewer most likely conclude about this portfolio?
medium
A. It only contains automation scripts without test cases
B. It lacks any bug reporting details
C. It is missing any test case descriptions
D. It is well-rounded with manual and automated tests

Solution

  1. Step 1: Analyze the portfolio contents

    The portfolio lists test cases, bug reports, and automation scripts, showing a variety of testing work.
  2. Step 2: Check for completeness

    Bug reports are included with details, and test cases cover features. Automation scripts are also present.
  3. Final Answer:

    It is well-rounded with manual and automated tests -> Option D
  4. Quick Check:

    Multiple test types = well-rounded portfolio [OK]
Hint: Look for variety: test cases, bugs, scripts [OK]
Common Mistakes:
  • Ignoring bug report details
  • Assuming automation means no manual tests
  • Missing that test cases are listed
4. You find this error in your testing portfolio README:
- Bug #201: "App crashes when clicking submit"
- Bug #202: "Login button not working"
- Bug #201: "Payment page freezes"

What is the main issue here?
medium
A. Bug descriptions are too detailed
B. Missing automation scripts
C. Duplicate bug IDs causing confusion
D. Test cases are not listed

Solution

  1. Step 1: Identify the problem in bug IDs

    Bug #201 appears twice with different descriptions, which can confuse readers and tracking systems.
  2. Step 2: Understand impact of duplicate IDs

    Duplicate IDs make it hard to reference bugs correctly and can cause errors in bug tracking.
  3. Final Answer:

    Duplicate bug IDs causing confusion -> Option C
  4. Quick Check:

    Unique bug IDs prevent confusion [OK]
Hint: Check for unique bug numbers [OK]
Common Mistakes:
  • Ignoring duplicate IDs
  • Thinking missing scripts is the main issue
  • Assuming descriptions are too long
5. You want to improve your testing portfolio by adding automation scripts. Which approach best demonstrates your skills?
hard
A. Add scripts that cover critical features with clear comments and results
B. Add many scripts without comments to show volume
C. Add scripts only for features you find easy to test
D. Add scripts that randomly test unrelated parts of the app

Solution

  1. Step 1: Identify quality over quantity

    Adding scripts that cover important features shows thoughtful testing and skill.
  2. Step 2: Importance of clarity and relevance

    Clear comments and showing test results help reviewers understand your work and its impact.
  3. Final Answer:

    Add scripts that cover critical features with clear comments and results -> Option A
  4. Quick Check:

    Quality scripts + clarity = strong portfolio [OK]
Hint: Focus on quality and clarity, not quantity [OK]
Common Mistakes:
  • Adding many unclear scripts
  • Ignoring critical features
  • Testing random unrelated parts
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard