Bird
Raised Fist0
Testing Fundamentalstesting~10 mins

Building a testing portfolio in Testing Fundamentals - Test Execution Trace

Choose your learning style10 modes available
Test Overview

This test simulates a beginner creating and verifying a simple testing portfolio webpage. It checks if the portfolio page loads correctly and contains key sections like 'About Me' and 'Projects'.

Test Code - Selenium with unittest
Testing Fundamentals
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import unittest

class PortfolioTest(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Chrome()
        self.driver.get('http://localhost:8000/portfolio.html')

    def test_portfolio_sections(self):
        driver = self.driver
        wait = WebDriverWait(driver, 10)

        # Wait for About Me section
        about_me = wait.until(EC.presence_of_element_located((By.ID, 'about-me')))
        self.assertTrue(about_me.is_displayed(), 'About Me section should be visible')

        # Wait for Projects section
        projects = wait.until(EC.presence_of_element_located((By.ID, 'projects')))
        self.assertTrue(projects.is_displayed(), 'Projects section should be visible')

    def tearDown(self):
        self.driver.quit()

if __name__ == '__main__':
    unittest.main()
Execution Trace - 5 Steps
StepActionSystem StateAssertionResult
1Test starts and Chrome browser opensChrome browser window is open and ready—PASS
2Browser navigates to 'http://localhost:8000/portfolio.html'Portfolio webpage loads in browser—PASS
3Wait until element with ID 'about-me' is present'About Me' section is present on the pageCheck if 'About Me' section is visiblePASS
4Wait until element with ID 'projects' is present'Projects' section is present on the pageCheck if 'Projects' section is visiblePASS
5Test ends and browser closesBrowser window is closed—PASS
Failure Scenario
Failing Condition: The 'projects' section is missing from the portfolio page
Execution Trace Quiz - 3 Questions
Test your understanding
What does the test check first after loading the portfolio page?
AIf the page title is correct
BIf the browser window is maximized
CIf the 'About Me' section is visible
DIf the 'Contact' section is present
Key Result
Always verify key sections or elements exist and are visible on your portfolio page to ensure it loads correctly for visitors.

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