Testing

Details about testing.

Test Strategy

To test the project, we used a combination of testing strategies. Since our solution involves recording audio with Brilliant Lab glasses, generating transcripts, and creating clinical reports, we focused on ensuring the system was intuitive and met the needs of clinical doctors. Continuous feedback was gathered from initial prototypes through to the final product. Additionally, each feature was rigorously tested to verify accurate audio recording, precise transcription, and correct report generation.

Unit Testing

In order to modularize the test structure, we test each feature group separately. We use mocking techniques (using the unittest.mock library, MagicMock, and the patch decorator) to isolate dependencies, allowing tests to focus on the current module's function by replacing external dependencies. This approach also allows us to simulate various edge cases which are difficult to trigger during normal execution.

For example, when testing the OpenVINO acceleration module, we replaced the actual OpenVINO library with mocks. This allowed the tests to run without specific hardware and cover different scenarios (such as model presence or absence, and processing success or failure) to ensure independence of tests.

In the case of the FrameGlassRecorder class, which handles audio recording and hardware interactions with Frame glasses, asynchronous testing was leveraged with pytest and pytest-asyncio. By mocking hardware dependencies like the microphone and display, we were able to test functionalities such as starting and stopping recordings, updating the UI, and handling tap events. This approach helped simulate edge cases, such as hardware failures, ensuring the class behaves reliably under various conditions.

For testing the database model, we use an SQLite in-memory database to validate models (such as Doctor, Patient, DoctorPatient relational tables, and Meeting). The in-memory database offers fast operation and complete isolation. Each test runs against a fresh database environment using setUp (to create a new database and session) and tearDown (to clean up resources), ensuring that a change in one test’s data won’t affect others.

User-Acceptance Testing

On March 11th, we demonstrated our project to our client and interested parties, collecting valuable comments and feedback.

Project Feedback

Positives:

Some Issues:

How We Improved

Additional Feedback