Anuj NagarData analysis & science writing

Experiment 05

Python Test Automation Framework

A small, honest pytest framework: tests run on every push, an interactive Allure report is published to GitHub Pages, and each test logs what went in, what was expected and what came out.

Period
Built Mar 2026
Stack
Python 3.11, pytest, Allure, GitHub Actions, python-can
Data
Simulated CAN messages, no hardware
Licence
GPL-3.0, open source
Question

Can a test suite run itself and leave a report anyone can read?

Test results that live on one laptop are easy to doubt. The goal was a loop where pushing code runs the tests, builds a readable report and puts it online, so the evidence is public and repeatable.

Method

pytest, Allure and GitHub Actions, with simulated CAN

The pipeline from push to published report. Coverage is tracked with Codecov.
  • Scenarios. CAN message transmission, arbitration ID validation and payload verification, using python-can to simulate the bus.
  • Structured logging. Every test records Input, Expected and Actual, so a failure explains itself in the report.
  • Structure. src/, tests/ and a shared conftest.py, so the framework can grow.
Result

A report you can click through, built without touching a button

The Allure report is live on GitHub Pages and refreshes on every push. It is a small project, but it contains the habits that matter in validation work: automated runs, reproducible evidence, and failures that say what happened.

Caveat

A starting point, not a production suite

  • It is a basic introduction to pytest with Allure, and the CAN bus is simulated. No hardware was involved.
  • It is licensed GPL-3.0 and meant to be read and borrowed.

Next steps listed in the repo: UDS diagnostic testing, real CAN hardware integration, parallel execution, and dashboard analytics.

Contact

Got a messy dataset or a science question?

I read everything and answer when I can. The quickest way is email, and LinkedIn works too.