Skip to main content
V-Run has built-in testing so you can verify your workflow logic before you commit.

Writing tests

Switch to the Test tab in the editor and write standard pytest tests against your main code.
Your test code can import functions from main (your main code file) directly.

Running tests

Click Run Tests in the editor toolbar. Tests execute in the same cloud sandbox as production runs, so the environment is identical. Results display in the bottom panel with:
  • Pass/fail status for each test
  • stdout and stderr output
  • Execution time
Run tests frequently during development. They execute in seconds and catch issues before they reach production.

Test requirements

If your tests need additional packages (e.g. pytest-mock, responses), add them to the test requirements file. These are installed alongside your main requirements during test execution.

Best practices

  • Test each function independently. Import individual functions from your main code rather than running the whole workflow.
  • Cover edge cases. Test empty inputs, malformed data, and error conditions.
  • Keep tests fast. Mock external APIs and databases when testing locally to keep the feedback loop tight.
  • Test before committing. Make it a habit to run the full test suite before you commit a new version.