Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/automationpanda/gotri-qr-payment-codes
A Python test automation project covering QR payment codes for the (fictitious) GoTri public transit system
https://github.com/automationpanda/gotri-qr-payment-codes
pytest python python-testing qr-code tdd test-automation test-driven-development test-framework testing the-way-to-test-software
Last synced: about 23 hours ago
JSON representation
A Python test automation project covering QR payment codes for the (fictitious) GoTri public transit system
- Host: GitHub
- URL: https://github.com/automationpanda/gotri-qr-payment-codes
- Owner: AutomationPanda
- License: mit
- Created: 2022-12-13T02:39:19.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-13T15:16:34.000Z (about 2 years ago)
- Last Synced: 2024-11-22T08:20:18.591Z (2 months ago)
- Topics: pytest, python, python-testing, qr-code, tdd, test-automation, test-driven-development, test-framework, testing, the-way-to-test-software
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoTri QR Payment Codes
This repository contains the example code for Chapter 4 in Andrew Knight's book, *The Way To Test Software*.
Each section of the chapter iteratively builds a small test automation solution in Python
to test QR payment codes for a fictitious public transit system named "GoTri".The example code for each section is placed into subdirectories within this repository
so you can view and execute the progress as a snapshot made at each stage of its development.1. Section 4.1 shows a few functions for generating QR payment codes.
2. Section 4.2 shows how to build a custom test framework from scratch.
3. Section 4.3 shows how to rewrite the entire test solution using [`pytest`](https://docs.pytest.org/).
4. Section 4.4 shows a new set of tests developed using *Test-Driven Development* (TDD).## Installation
The example code should work on any operating system (Windows, macOS, Linux).
To install it:1. Install [Python](https://www.python.org/) 3.8 or higher.
2. Clone this repository onto your local machine.
3. Install dependency packages from the command line:
* Change directory to the project's root directory.
* Run `pip install -r requirements.txt` to install all dependencies.## Execution
Each section subdirectory functions as its own project.
The table below shows how to execute the code at each snapshot.
Change directory into the project subdirectory before running commands.| Section | Project Subdirectory | Execution Commands |
| ------- | -------------------- | ------------------ |
| 4.1 | `gotri_app` | Load and call functions from the `qrcodes` module in the `python` interpreter |
| 4.2.2 | `gotri_app` | `python test_qrcodes.py` |
| 4.2.3 | `gotri_app` | `python test_qrcodes.py` |
| 4.2.4 | `gotri_app` | `python run_all_tests.py` |
| 4.2.5 | `gotri_app` | `python run_all_tests.py` |
| 4.2.6 | `gotri_app` | `python run_all_tests.py` |
| 4.2.7 | `gotri_app` | `python run_all_tests.py` |
| 4.3 | `gotri_app_pytest` | `python -m pytest tests` |
| 4.4.2 | `gotri_app_pytest` | `python -m pytest tests` |
| 4.4.3 | `gotri_app_pytest` | `python -m pytest tests` |
| 4.4.4 | `gotri_app_pytest` | `python -m pytest tests` |