Core components for Campus apps smoke tests #205
Replies: 3 comments 2 replies
-
These are contract tests actually; checking that the app, when given certain input, returns certain output. Smoke tests are:
|
Beta Was this translation helpful? Give feedback.
-
|
And I think the AI prompt need not specify which tests to add, rather should clarify the intent and purpose of tests. Smoke tests: should be fast (run before every commit), only do basic sanity checks without "digging into detail" Also state expected standards, e.g.:
|
Beta Was this translation helpful? Give feedback.
-
|
@sparsetable for devops could you also look into setting up git hooks ? Some that I'm thinking of:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Core components for smoke tests
Test Client Fixture:
A reusable pytest fixture that initializes the Flask app in TESTING=True mode and provides a test_client for making isolated HTTP requests without running a live server.
App Initialization Test:
Verifies that the Flask application module imports successfully and the app object exists and is properly initialized (i.e. can create a test client and routing map).
Route Presence Test:
Checks that critical application routes are registered in the Flask app’s URL map, ensuring essential endpoints exist. Uses subset validation so the test only verifies required routes are present without enforcing a complete or rigid route list.
Sample AI prompt for smoke test generation (adjust according to needs)
Helpful additional context to provide:
Sample tests (adjust according to own app structure)
Beta Was this translation helpful? Give feedback.
All reactions