📊 We use cookies & analytics to improve your experience. Learn more
Latest

Software Testing — Manual and Automation Module 3 · Lesson 9 of 15

0% Exit to course

Module 3 · Automation with Selenium and a real project Lesson 9 of 15

A portfolio suite with a report

Learning objective

A runnable suite with a readable report is the most convincing artefact a fresher QA can show: it proves you write code and that you think in checks.

The concept

Take the scripts you have, put them in a folder with a requirements.txt and a README, and run them with pytest. Pytest finds every file named test_*.py and every function named test_*, runs them, and gives you a pass and fail summary you can show in an interview.

Organise by journey rather than by page: test_search.py, test_apply.py, test_login.py. Add a screenshot on failure — pytest hooks make it a dozen lines — so you have evidence of the bug as well as the report. Then put it on GitHub and describe it in three lines on your resume.

Python
# tests/test_jobs.py     run:  pytest -q --html=report.html
import pytest
from pages.jobs import JobsPage

@pytest.mark.parametrize("keyword,minimum", [("analyst", 1), ("zzz", 0)])
def test_search_results(driver, keyword, minimum):
    page = JobsPage(driver).open()
    assert len(page.search(keyword).results()) >= minimum

def test_apply_requires_login(driver):
    page = JobsPage(driver).open().open_first_job()
    page.apply()
    assert page.current_path() == "/login"

Common mistakes

The mistake is a project that only asserts that pages load. Assertions on behaviour — the count went up, the message appeared, the field is disabled — are what make it look like testing rather than browsing. Five real checks beat fifty page-loads.

Worked example

Six tests over a public practice site, run with pytest, producing a pass/fail report with screenshots on failure, is plenty — and the screenshot-on-failure detail is what an interviewer remembers.

Your practice task

Build the suite, push it with a README explaining how to run it, and save one real failing run to show what your reports look like.

Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.

Key takeaway

Take the scripts you have, put them in a folder with a requirements.txt and a README, and run them with pytest.

Create free account or sign in

Almost there

15 lessons left of 15

Finish every lesson to unlock the certificate. Each one ends in a practice task — do them and the final project brief writes itself.

Next recommended course Full-Stack Web Development Bootcamp