Case study · Test automation

Town2Career Selenium test suite

End-to-end UI automation for town2career.com, a careers and training platform, built in Python, Selenium 4 and Pytest and handed over running in CI.

Automated test results shown on a dashboard
0 flaky tests
45Automated tests
89%Passing at handover (40 of 45)
5Defects found
~80sFull run on 4 parallel workers

Client

Town2Career — a careers platform offering campus recruitment training, internships and placement assistance.

Stack

Python 3.13, Selenium 4.51 and Pytest 9.1, running against Chrome 141 in headless mode.

Environment

A dedicated test copy of the site seeded with test data. Enquiry emails were captured by a test mail sink, so no real leads were ever sent.

The challenge

A lead-driven site with no safety net

Town2Career's business depends on enquiry forms: every student enquiry becomes an email to the team. Nine public pages, three separate enquiry forms and a blog admin were all being checked by hand before each change, which is slow and easy to get wrong.

  • No automated coverage of the pages that generate leads
  • No way to tell whether a deployment had broken a form
  • Regression checks repeated manually on every release
Source code on screen
What we built

A page-object suite built to last

Structured so the team can extend it without rewriting locators every time the site changes.

Page objects

SitePage, EnquiryForm, LoginPage, CreateBlogPage and BlogListPage, all built on a shared BasePage.

Stable waiting

Explicit waits, pre-loader handling and scrolling in BasePage, which is why the suite recorded zero flaky tests.

Test mail sink

A capture inbox so the content of every lead email could be asserted without sending real mail.

Evidence on failure

A screenshot captured automatically for every failing test, attached beside it in the report.

CI pipeline

GitHub Actions runs the suite on every push and pull request, plus nightly at 02:00 IST.

Reporting

An HTML report with filters, timings and assertion detail, plus JUnit XML for the build system.

Coverage

What the suite checks

Test coverage by area, showing tests, passes, failures and pass rate
Area Tests Passed Failed Pass rate
Navigation & pages 16160100%
Enquiry forms & lead email 129375%
Blog admin & pages 76186%
Images & SEO 109190%
Total 4540589%

In scope

  • All nine public pages, the header menu and contact links
  • Enquiry forms on three pages, plus the lead email each one generates
  • Blog admin: login, access control and publishing
  • Broken images and page titles

Out of scope

Agreed with the client up front and stated in the report:

  • Security and penetration testing
  • Load and performance testing
  • The separate learning platform
  • Third-party embeds such as maps and social widgets
Results

Five defects, each reproduced five times

Every defect was delivered with evidence, a root cause and a suggested fix. None of them were intermittent.

High

Lead emails arrived without a phone number

The mail handler never passed the phone field through, so every enquiry reached the team with no callback number. A one-line fix was supplied.

Medium

A second recipient never received leads

Two addresses were being added in a single call, so the second was treated as a display name rather than a recipient.

Medium

The phone field accepted letters

No pattern on the input and no server-side check, so unusable phone numbers could be submitted.

Low

Every public page shared one title

All nine pages used the same title tag, which weakens search ranking and makes browser tabs indistinguishable. A per-page title was proposed for each.

Low

Broken images on posts without a picture

The blog template always rendered an image tag, so posts with no picture showed a broken image instead.

0 flaky

Results you can trust

All five defects reproduced on five consecutive runs, and no test produced an inconsistent result. A red build always meant a real defect.

A developer workstation with code on screen
Handover

Delivered so the team can run it themselves

  • Source code and a README covering setup and usage
  • The GitHub Actions workflow, already running
  • HTML report and JUnit XML from every run
  • A test mail sink for the staging environment
  • The full defect list with evidence and suggested fixes
  • A walkthrough session with the team
Recommended next

Where we suggested going next

Fix the two lead defects first

Then re-run the enquiry suite, so every lead reaches the team complete.

Add mobile-viewport runs

Run the enquiry forms at 375px, because most of the site's visitors are on phones.

Run the smoke suite on deploy

A short critical-path run after every deployment catches broken forms within minutes.

Want this for your product?

We build the same kind of suite for SaaS, FinTech, E-commerce and EdTech teams, or place QA engineers directly into yours.