Skip to content

208 unit testing plan - #217

Draft
frayle-ons wants to merge 3 commits into
mainfrom
208-unit-testing-plan
Draft

208 unit testing plan#217
frayle-ons wants to merge 3 commits into
mainfrom
208-unit-testing-plan

Conversation

@frayle-ons

Copy link
Copy Markdown
Contributor

See #208 on Unit Test Planning for the ClassifAI package

✨ Summary

These changes create a new tests folder in the root project directory. Its contents contains elementary export tests for the ClassifAI package interface (test_exports.py), as well as a breakdown of potential unit testing cases for each of the core modules of ClassifAI; as of version 1.1.1. (Vectorisers, Indexers, Servers and Evaluation).

Each of these modules has its own subfolder within tests, for example test_indexers. Each subfolder contains 2 files:

  • a readme.md which provides a broad overview of the potential unit testing for that module, including functionality testing, edge cases, input/output validation and more.
  • a '*_example.pyfile containing some code samples of implemented unit testing using Copilot that had access to thereadme.md` file of the module to design/generate the example.

Each unit testing module is designed to be separated from the others. For example, the indexers module utilises Mock Vectorisers and CSV data to test VectorStore init functionality - this is the code generated with the Copilot example. Aims to ensure that unit testing can be done independently for each module.

The unit testing plan is broken down this way in relation to the 4 tickets that have been produced on the project board: #215 #213 #214 (possibly missing one for the evaluation module at time of writing). For each ticket, the current information in each of the unit test plan subfolders would provide someone working on that module an outline of what to unit test, and examples of implemented code.

📜 Changes Introduced

  • Added tests folder for Pytest
  • Added export tests to ensure that all correct surface level exports operate effectively
  • Added 4 unit tests subfolders, one for each key ClassifAI module
  • readme for each test subfolder providing a detailed breakdown of unit tests to be implemented
  • example python test file for each subfolder, generated with Copilot (implements a specific example from the corresponding readme file for the given subfolder.

🔍 How to Test

Initially just running pytest in the usual manner on command line triggers the basic export testing as well as the Copilot implemented examples .

@frayle-ons frayle-ons linked an issue Aug 10, 2026 that may be closed by this pull request
@lukeroantreeONS

Copy link
Copy Markdown
Contributor

Can I confirm this is ready for review? (If so, I'll take it off draft mode)
I'd prefer to remove the copilot tests from this PR also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit Testing (Plan)

2 participants