Selenium Practice Projects for Software Testing Internships: Savitribai Phule Pune University Guide

Selenium Practice Projects for Software Testing Internships: Savitribai Phule Pune University Guide

Facebook
Twitter
LinkedIn
WhatsApp
Email

The best Selenium practice project for a software testing internship is a small, well-structured suite that automates one realistic user journey (login, search, add to cart, checkout) on a site you are allowed to test. It should use page objects, an external test data sheet and screenshots saved for every failure. This guide gives you the full structure, the data sheet, the code skeleton and a scorecard so you can build it in a weekend and explain it in an interview.

What an internship reviewer looks for in a Selenium project

A fresher’s Selenium project is rarely judged on how many scripts it has. A reviewer, whether a mentor, a faculty member or a hiring manager, usually wants to see that you understand how to keep tests maintainable and how to prove what happened in a run. Ten tidy tests beat fifty copy-pasted ones.

  • Separation of concerns: locators and page actions live in page classes, assertions live in tests.
  • Data outside code: inputs and expected results sit in a CSV or Excel sheet, not hard-coded in test functions.
  • Reliable waiting: explicit waits instead of time.sleep().
  • Evidence: a report and screenshots that someone else can open without running your code.
  • Honest scope: a README that says what is covered and what is not.

SPPU engineering internship rules and where a Selenium checkout project fits

Students on the 2019-pattern undergraduate engineering scheme can find the relevant rules in a Faculty of Science and Technology rules document for the 2019-20 pattern, published on the university’s college-circulars site. It is a 2019 document, so newer cohorts should check whether it has been replaced. It covers engineering programmes only; the rules for BCA, BCS, MCA or M.Sc. students may differ and should be confirmed separately.

According to that document, the internship is completed after semester 5 and assessed in semester 6, lasting 4 to 6 weeks at most. In practice, a testing project like the checkout automation in this guide is best built before that window, so there is something concrete to discuss with a supervisor. The same document lists the semester VI internship at 4 credits, evaluated through 100 marks of term work, with no theory or oral exam marks. Term work is judged on evidence, which makes a tidy repository, a test report and failure screenshots useful material.

The document also says that each student must keep documentary proof of internship activities, and that the Programme Head, Cell In-charge, Project Head, faculty mentor or industry supervisor evaluates the overall compilation. A participation certificate is required where applicable. Keep dated commit history, report exports and a short weekly log so the compilation is easy to assess.

Placements can be at an industry, government body, NGO, MSME or rural setting, or students may do innovation, IPR or entrepreneurship work, with conduction, monitoring and evaluation following AICTE guidelines. The document does not use the words online, virtual or remote for internships, so do not assume a remote arrangement is accepted. A self-built practice project is not an internship by itself; whether any part of it counts is for your department to decide.

Questions to settle with your SPPU department before relying on this project

  • Ask your internship cell or Programme Head which rules document applies to your syllabus pattern year, and whether it is still current.
  • Confirm whether a remote or online testing internship is accepted, and what proof your college wants.
  • Ask your faculty mentor whether a self-directed project can go into the term-work compilation, and in what format.
  • Check the required participation certificate format and who signs it.
  • If you are not in engineering, ask your department for the equivalent internship or project rules for your programme.

Free 2-Week CareerSwami Internship

Online, 14 days, with a free offer letter and a free completion certificate once you finish the work. Check with your college that it fits your requirement before you enrol.

Apply for the free internship

The practice project: automate an e-commerce checkout journey

Pick a public demo shop built for practice, or a site whose owner explicitly allows automated testing. Do not point Selenium at a live commercial site, a college portal or an exam system. Automated traffic against systems you do not own can breach their terms and can disrupt real users.

The journey to automate has five stages:

  1. Log in with valid and invalid credentials.
  2. Open the product listing and sort or search.
  3. Add one or more products to the cart.
  4. Verify cart contents and totals.
  5. Complete checkout with valid and invalid form data.

Tools

  • Python 3.10 or later
  • Selenium 4 (it can manage the browser driver for you)
  • pytest as the test runner
  • pytest-html for an HTML report
  • Chrome or Firefox
  • Git and a GitHub repository

Folder structure

This layout is illustrative. Rename files to suit your project.

selenium-checkout-project/
├── pages/
│   ├── base_page.py
│   ├── login_page.py
│   ├── inventory_page.py
│   ├── cart_page.py
│   └── checkout_page.py
├── tests/
│   ├── test_login.py
│   ├── test_cart.py
│   └── test_checkout.py
├── data/
│   ├── login_data.csv
│   └── checkout_data.csv
├── utils/
│   ├── config.py
│   └── csv_reader.py
├── reports/
│   └── screenshots/
├── conftest.py
├── pytest.ini
├── requirements.txt
└── README.md

Step-by-step build

Step 1: Set up the environment

  1. Create a virtual environment and activate it.
  2. Add selenium, pytest and pytest-html to requirements.txt and install them.
  3. Create the folders above and initialise a Git repository.

Step 2: Write a base page

The base page holds the waiting and interaction helpers every page class reuses. This is illustrative code; adjust it to your Selenium version and test site.

from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

class BasePage:
    def __init__(self, driver, timeout=10):
        self.driver = driver
        self.wait = WebDriverWait(driver, timeout)

    def click(self, locator):
        self.wait.until(EC.element_to_be_clickable(locator)).click()

    def type_text(self, locator, text):
        el = self.wait.until(EC.visibility_of_element_located(locator))
        el.clear()
        el.send_keys(text)

    def text_of(self, locator):
        return self.wait.until(EC.visibility_of_element_located(locator)).text

Step 3: Write a page object

Locators are class attributes. Methods describe user actions, and they return data or another page, never a pass/fail verdict.

from selenium.webdriver.common.by import By
from pages.base_page import BasePage

class LoginPage(BasePage):
    USERNAME = (By.ID, "user-name")
    PASSWORD = (By.ID, "password")
    SUBMIT   = (By.ID, "login-button")
    ERROR    = (By.CSS_SELECTOR, "[data-test='error']")

    def open(self, base_url):
        self.driver.get(base_url)
        return self

    def login(self, username, password):
        self.type_text(self.USERNAME, username)
        self.type_text(self.PASSWORD, password)
        self.click(self.SUBMIT)

    def error_message(self):
        return self.text_of(self.ERROR)

The locators above are placeholders. Inspect your chosen practice site and replace them with stable attributes such as IDs or dedicated test attributes before using any CSS or XPath based on layout.

Step 4: Build the test data sheet

Keep each row as one test case with an ID, input, expected result and a priority. A reviewer can read the sheet and understand your coverage without opening any code.

Test ID Scenario Username Password Expected result Type Priority
LG-01 Valid login valid_user valid_pass Product page opens Positive High
LG-02 Wrong password valid_user wrong_pass Error message shown, stays on login Negative High
LG-03 Empty username (blank) valid_pass Username required message Negative Medium
LG-04 Empty password valid_user (blank) Password required message Negative Medium
LG-05 Username with leading space valid_user valid_pass Record actual behaviour; compare with requirement Boundary Low
CK-01 Checkout with valid details Name, surname, PIN code 411007 Order summary page opens Positive High
CK-02 Checkout with blank PIN code Name, surname, blank PIN Validation error shown Negative High
CK-03 Special characters in name Name with symbols Record actual behaviour Negative Low

Save the same data as data/login_data.csv. Use dummy values only. Never put real personal details, real passwords or any college login in a data sheet that goes onto GitHub.

Step 5: Drive tests from the data

Use pytest.mark.parametrize with a small CSV reader. Illustrative code:

import csv, pytest
from pages.login_page import LoginPage
from utils.config import BASE_URL

def read_rows(path):
    with open(path, newline="", encoding="utf-8") as f:
        return list(csv.DictReader(f))

ROWS = read_rows("data/login_data.csv")

@pytest.mark.parametrize("row", ROWS, ids=[r["test_id"] for r in ROWS])
def test_login(driver, row):
    page = LoginPage(driver).open(BASE_URL)
    page.login(row["username"], row["password"])
    if row["type"] == "Positive":
        assert "inventory" in driver.current_url
    else:
        assert row["expected_text"] in page.error_message()

Step 6: Capture screenshots on failure

Put a fixture and a hook in conftest.py. A screenshot named after the test ID is easy to match with your sheet.

import os, pytest
from selenium import webdriver

@pytest.fixture
def driver(request):
    d = webdriver.Chrome()
    d.maximize_window()
    request.node.driver = d
    yield d
    d.quit()

@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_makereport(item, call):
    outcome = yield
    report = outcome.get_result()
    if report.when == "call" and report.failed:
        d = getattr(item, "driver", None)
        if d:
            os.makedirs("reports/screenshots", exist_ok=True)
            d.save_screenshot(f"reports/screenshots/{item.name}.png")

Also take one deliberate screenshot of a passing run for your README. Evidence of a green run is just as useful as evidence of a failure.

Step 7: Run and produce the report

pytest --html=reports/report.html --self-contained-html

Open the HTML report and check that it lists each test ID. Paste the actual output from your own machine into the README, because only your own run counts as evidence.

Worked illustrative example: one defect, traced end to end

This example is illustrative. It shows how to document a result, and it is not a record of a real run.

Suppose test CK-02 (checkout with a blank PIN code) is expected to show a validation message. Your script fills first name and surname, leaves the PIN code empty and clicks Continue. Suppose the application moves to the order summary page instead.

  1. The assertion for the expected error fails, and pytest marks CK-02 as failed.
  2. The hook saves reports/screenshots/test_checkout[CK-02].png, showing the summary page.
  3. You re-run the steps manually once, to rule out a locator or timing mistake in your own script.
  4. Only after that confirmation do you log a defect.
Field Illustrative entry
Defect ID DEF-004
Linked test CK-02
Summary Checkout proceeds when PIN code is blank
Steps Add any product, open cart, click Checkout, enter name and surname, leave PIN code blank, click Continue
Expected Validation message for the missing PIN code; user stays on the form
Actual Order summary page opens
Severity / Priority Medium / High
Evidence Screenshot file name, browser and version, date

A single clear defect record like this shows more testing maturity than a long list of vague “bug found” notes. If the application you test is a demo site that deliberately contains faults, say that in your README so no one mistakes your findings for a claim about a real product.

Project scorecard: grade your own project before sharing it

Score each row from 0 to 3 (0 = missing, 1 = weak, 2 = acceptable, 3 = strong). A total of 30 or more out of 42 is a reasonable bar for sharing the repository with a mentor.

Area What a 3 looks like Your score (0-3)
Page objects No locators in test files; each page has its own class
Test data All inputs in CSV with test IDs, positive and negative rows
Waits Explicit waits only; no fixed sleeps
Assertions Each test checks one clear outcome with a meaningful message
Locators IDs or test attributes preferred; no long absolute XPath
Evidence HTML report and named screenshots included in the repository
README Setup, run command, scope, limitations, sample report image

Reproducibility checklist for screenshots and results

Someone should be able to clone your repository and reproduce the same evidence. Check each item:

  • requirements.txt pins package versions.
  • The README lists the browser name and version you used.
  • The base URL sits in one config file, not scattered through tests.
  • Test data uses only dummy values.
  • Screenshots are named after test IDs.
  • The report shows the date and the number of passed, failed and skipped tests.
  • Any intentionally failing test is marked in the README with the reason.

Common mistakes that weaken Selenium projects

  • Using time.sleep() everywhere. It slows runs and still fails on slow pages. Use explicit waits.
  • Putting assertions inside page classes. It makes pages hard to reuse; keep assertions in the tests.
  • One giant test. A single 60-step script hides which step failed. Keep tests independent.
  • Testing only the happy path. Add blank, over-length and invalid inputs.
  • Copying a tutorial unchanged. Change the site, the data and the scenarios so you can explain every line.
  • Committing screenshots with personal data. Check each image before pushing.

A two-week plan to build this alongside your studies

If you are working within a fixed window, such as a two-week internship, this schedule keeps the work realistic.

Days Focus Output
1-2 Setup, choose the practice site, write test scenarios Repository, first draft of the data sheet
3-4 Base page and login page, first tests LG-01 to LG-05 running
5-6 Inventory and cart pages Cart tests with data-driven rows
7-8 Checkout page and negative tests CK-01 to CK-03 running
9-10 Screenshot hook, HTML report, config clean-up Report and evidence folder
11-12 Defect log, scorecard review, refactor Defect sheet, scorecard completed
13-14 README, final re-run, short walkthrough notes Shareable repository

If you want a structured place to do this kind of work, CareerSwami offers a free two-week online internship with 26 tracks, a free offer letter and a free completion certificate after successful completion. The project in this article is a self-study exercise and does not depend on it.

Turning the project into interview answers

Prepare short, truthful answers on the following topics. Each one should refer to something you actually built.

  • Why did you choose page objects, and what changed in your tests once you did?
  • Which locator strategy did you prefer, and why?
  • How did you handle a flaky test? Describe the cause you found.
  • What does your data sheet cover, and what does it leave out?
  • Which defect would you rank highest, and how did you decide its severity?
  • What would you add next: cross-browser runs, API checks, a CI pipeline?

Questions to settle with your SPPU department before relying on this project

Because requirements differ by programme and college, put these questions to the right person, preferably in writing so you have a reply on record:

  • Your department’s project or internship coordinator: Does a self-directed Selenium project count toward a mini-project, internship report or lab journal, and in what format?
  • Your current syllabus document: Download the syllabus for your exact programme and pattern year from the university’s official website or your college office, and check whether software testing or automation appears as a unit or elective.
  • Your college’s training and placement cell or internship cell: Is there a required approval form, mentor signature or letter format for an external online internship?
  • Your faculty guide: Will they review a GitHub repository, or do they need a printed report?
  • The lab in-charge: Are you allowed to install Selenium and browsers on college machines, or should you work on a personal laptop?

Frequently Asked Questions

Which language is best for a first Selenium project?

Python with pytest has a gentle learning curve, and Java with TestNG is widely used in testing roles. Choose the one you already know, because the page-object idea is identical in both. Pick one and finish a project before switching.

How many test cases should a fresher’s project have?

Between 15 and 30 well-chosen cases across three or four pages is enough. Include positive, negative and boundary rows. Quality of coverage and clarity of documentation matter more than volume.

Can I use my college’s website or portal as the application under test?

No, not without written permission from the people who run it. Use a public demo site built for practice, or an application you built yourself, so there is no risk of disrupting a real service.

Do I need Excel, or is CSV enough?

CSV is enough and is simpler to read with Python’s standard library. If you prefer Excel, a library such as openpyxl can read it, but CSV files also display cleanly on GitHub.

Should screenshots be taken only on failures?

Capture failures automatically, and add a few deliberate screenshots of passing runs for the README. Name every file after its test ID so the evidence links back to your data sheet.

What is the difference between implicit and explicit waits?

An implicit wait applies a global timeout to element lookups. An explicit wait pauses for a specific condition on a specific element, such as it being clickable. Explicit waits give clearer failures, and mixing the two can cause unpredictable delays.

Will this project count for academic credit at SPPU?

That depends on your programme and college, and no general answer applies. Ask your project or internship coordinator, as listed above, and get the answer in writing before you rely on it.

Can I run these tests without opening a browser window?

Yes. Chrome and Firefox support headless mode through browser options. Run visibly while developing so you can see what is happening, then switch to headless for faster runs once the tests are stable.

Related Software Testing guides

Ready to put this into practice?

Join the free two-week CareerSwami online internship in Software Testing. The internship, the offer letter and the completion certificate are free.

Start your free 2-week internship

Web Stories

Scroll to Top