GithubHelp home page GithubHelp logo

automationpanda / gotri-qr-payment-codes Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 14 KB

A Python test automation project covering QR payment codes for the (fictitious) GoTri public transit system

License: MIT License

Python 100.00%
pytest python python-testing qr-code tdd test-automation test-driven-development test-framework testing the-way-to-test-software

gotri-qr-payment-codes's Introduction

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.
  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 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

gotri-qr-payment-codes's People

Contributors

automationpanda avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.