AppTester
Helper class to test that an app (Reflex or Streamlit) starts and runs correctly.
Usage with a task that generates the app: AppTester.test_app_from_task( test_case=self, generate_task_type=GenerateReflexShowcaseApp, app_output_name="reflex_app", input_resources={"resource": table}, )
Usage with an existing AppResource: AppTester.test_app(self, app_resource)
For a much faster, Reflex-only check that the app builds (no process start, no health check, no database), use test_app_compiles / test_app_compiles_from_task instead.
Test that an app resource starts and runs correctly.
TestCaseAppResourceCheck that a Reflex AppResource compiles, without starting it.
TestCaseAppResourceRun a task to generate a Reflex AppResource, then check that it compiles.
This is a much faster alternative to test_app_from_task: it only checks that the app builds (imports, pages, computed vars), without starting a process, opening a port, or hitting a health check. It needs no database and does not verify that the app behaves correctly with real data. Streamlit apps have no compile step, so this only supports Reflex apps.
TestCasetypestrdict[str, gws_core.resource.resource.Resource] | Nonedict | NoneRun a task to generate an AppResource, then test that the app starts and runs correctly. It tests that the resource generated by the generate_task_type can be started as an app, that the app process is running, and that the health check endpoint returns a successful response. It also tests that the app process can be stopped.
TestCasetypestrdict[str, gws_core.resource.resource.Resource] | Nonedict | NoneRun a task using TaskRunner to generate an AppResource, then test that the app starts and runs correctly. This is a lighter alternative to test_app_from_task that does not require creating a full scenario.
TestCasetypestrdict[str, gws_core.resource.resource.Resource] | Nonedict | None