diff --git a/components/outputs/ui/app-variation-login-core.py b/components/outputs/ui/app-variation-login-core.py new file mode 100644 index 00000000..e69de29b diff --git a/docs/end-to-end-testing.qmd b/docs/end-to-end-testing.qmd index 7393249a..af420799 100644 --- a/docs/end-to-end-testing.qmd +++ b/docs/end-to-end-testing.qmd @@ -174,8 +174,33 @@ shiny add test ``` 1. Answer the prompts: It will ask for the path to your app file (e.g., `app.py`) and a name for your test file (e.g., `test_myapp.py`). Remember, the test file name must start with `test_`. +1. Generated test files usually include simple assertions that check visible UI text and interactive states for Shiny components (for example, slider values or checkbox output). Treat these as a starting point and expand them to cover additional behaviors, edge cases, and integration points as needed. -1. Edit the generated test file: This command creates a basic test file. You'll need to modify it to add your specific test scenarios (like the slider example above). +Before generating tests, make sure you have: + +- An API key or credentials for the provider you intend to use: + - Anthropic: `export ANTHROPIC_API_KEY=...` + - OpenAI: `export OPENAI_API_KEY=...` + +- A working Shiny app file (e.g. `app.py`). +- Shiny testing dependencies installed. If you haven't installed the extras yet: + +```bash +pip install "shiny[add-test]" +``` + +#### Choosing a provider for generating tests + +```bash +# Anthropic (default) +shiny add test --app app.py + +# OpenAI (will use gpt-5) +shiny add test --app app.py --provider openai + +# explicitly use gpt-5-mini model +shiny add test --app app.py --provider openai --model gpt-5-mini +``` ### Troubleshooting Common Issues