Skip to content

Testing guide

Joel B edited this page May 12, 2026 · 1 revision

This page gives a simple checklist for testing Pynventory changes before opening a pull request.

Before testing

Make sure you are on your feature branch:

git branch

Run the app from the repository root:

python -m pynventory.main

Basic smoke test

Use this checklist for most changes:

  • start the app
  • run help
  • add a product
  • list products
  • modify a product
  • delete a product
  • try at least one invalid input
  • exit the app cleanly

The app should not crash during normal use.

Test adding a product

Check that:

  • the app asks for the expected product information
  • empty required values are handled correctly
  • negative numbers are rejected where they should be rejected
  • the product appears in the list after being added

Test listing products

Check that:

  • saved products are shown
  • product values are readable
  • the output is not confusing
  • the app behaves reasonably if there are no products

Test modifying a product

Check that:

  • the app asks for a product ID
  • the current values are shown
  • changed values are saved
  • unchanged values stay the same
  • invalid IDs are handled
  • help, list, and exit still behave correctly if supported in the modify flow

Test deleting a product

Check that:

  • the app asks for a product ID
  • the app asks for confirmation before deleting
  • confirming deletes the product
  • cancelling does not delete the product
  • invalid IDs are handled

Test invalid input

Try inputs that users might accidentally type:

  • empty text
  • letters where a number is expected
  • negative numbers
  • unknown commands
  • product IDs that do not exist

The app should show a useful message and continue running.

Check Git status

Before committing, run:

git status

Only files related to your change should appear. Do not include local development files such as:

  • data/products.db
  • __pycache__
  • .ruff_cache
  • .venv

If data/products.db appears in your status, see the Troubleshooting page.

What to write in the pull request

In the pull request template, describe what you tested. Example:

I tested this manually by starting the app, adding a product, listing products, modifying the product, deleting it, and trying invalid input for the changed command.

Be honest. If you did not test something, say so.

When manual testing is enough

Manual testing is useful for small changes, documentation changes, and early project work. As the project grows, automated tests should be added for behavior that is important or easy to break.

Automated testing

Automated tests are planned as part of Phase 2 of the project roadmap. For now, use this manual testing guide before opening pull requests.

Once automated tests are introduced, we will document:

  • how to run the test suite
  • how to write new tests
  • what test framework is used
  • what should and should not be tested

If you want to help set up automated testing, open a GitHub issue or discuss it on Discord.

Clone this wiki locally