AppClient in the fal SDK gives you a way to do this programmatically — it deploys your app to fal’s serverless infrastructure in ephemeral mode, runs your tests against the live endpoints (including GPU execution, setup(), and the full request pipeline), and cleans up the deployment when testing is complete.
This means your tests run against the real environment your app will use in production, not a mocked local version. If your model loads correctly in setup(), processes inputs through your endpoint, and returns valid outputs, you can be confident the deployed version will behave the same way. You can integrate these tests into your CI pipeline to catch regressions before they reach production.
Testing with AppClient
AppClient connects to your app class and exposes its endpoints as callable methods. It handles deployment, connection, and teardown automatically via a context manager.