Testing — Aquilia Documentation
Comprehensive guide and documentation for Testing in the Aquilia framework. View API reference, examples, and implementation patterns.
Tooling / Testing Testing Framework Aquilia provides a batteries-included testing framework designed to test async controllers, background jobs, DB integrations, and WebSocket endpoints. It features automated server lifecycle hooks, DI mocking containers, mock storage, and custom assertions. Testing Architecture Testing in Aquilia avoids slow network calls and side effects by leveraging in-process ASGI loops. It connects your tests directly to the dependency container, permitting run-time provider swapping: , , ].map((item, i) => ( ))} Writing Your First Test Subclass AquiliaTestCase to write an integration test. The server automatically starts up before the test runs and self-terminates on completion: from aquilia.testing import AquiliaTestCase from myapp.manifests import users_manifest class TestUserAPI(AquiliaTestCase): # Specify the manifests to load into the test server manifests = [users_manifest] # Overwrite configuration fields settings = } async def test_create_user(self): # Trigger an HTTP post response = await self.client.post("/api/users", json= ) # Use built-in assertions self.assert_status(response, 201) self.assert_json_path(response, "username", "testguy") Framework Reference , , , ].map((sec, i) => ( → ))} CLI OpenAPI )
Go to Homepage