Skip to main content

Execute Luau tests on Roblox Cloud

Project description

Roblox Test Runner

PyPI version License: MIT

Roblox Test Runner is a powerful CLI tool designed to execute Luau tests (TestEZ) directly on Roblox Cloud. It allows you to run unit tests from your local machine and see the results instantly, integrating seamlessly into your development workflow.

Features

  • 🚀 Run Tests on Cloud: Execute tests in a live Roblox server environment.
  • 📦 Rojo Integration: Automatically respects your default.project.json structure.
  • ⚙️ Configurable: Use roblox-test-runner.toml to customize paths, timeouts, and more.
  • 🔄 Watch Mode: Automatically re-run tests when files change (-w).
  • 🤖 CI/CD Ready: Native support for GitHub Actions authentication.

Installation

pip install roblox-test-runner

Quick Start

  1. Initialize Configuration:

    roblox-test-runner init
    

    This creates a roblox-test-runner.toml file.

  2. Set API Key (for local development):

    roblox-test-runner set-api <YOUR_API_KEY>
    
  3. Run Tests:

    roblox-test-runner run
    

    or watch for changes:

    roblox-test-runner run --watch
    

Usage

Commands

  • run [test_name]: Run tests. omit test_name to run all.
    • -v, --verbose: Show full logs.
    • -w, --watch: Watch mode.
    • -j, --json: JSON output.
  • init: Create default configuration.
  • config: View current configuration.
  • set-api <key>: Save API key.
  • auth: CI/CD authentication helper.

Configuration (roblox-test-runner.toml)

[runner]
timeout = 60
tests_folder = "tests"

[project]
rojo_project = "default.project.json"

Environment & Debugging

Execution Environment

Tests run in a Roblox Cloud headless environment. This has some important limitations:

  • No Physics Simulation: Gravity and physics stepping do not run automatically.
  • Headless: No visual rendering.
  • Script Context: Tests run inside a temporary script, often referred to as TaskScript.

Debugging

The runner automatically maps stack traces from the bundled TaskScript back to your original source files (supported for .luau files managed by Rojo).

  • If you see TaskScript:123, update to the latest version to see src/my_script.server.luau:45.
  • Use print() debugging freely; logs are streamed back to your terminal.

API Keys

API keys can be provided in three ways (checked in order):

  1. CLI Argument: roblox-test-runner run --key <KEY> (mostly for CI)
  2. Environment Variable: ROBLOX_API_KEY
  3. User Configuration: Saved via roblox-test-runner set-api <KEY> (stored in your user home directory, not project)

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roblox_test_runner-0.3.0.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

roblox_test_runner-0.3.0-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

File details

Details for the file roblox_test_runner-0.3.0.tar.gz.

File metadata

  • Download URL: roblox_test_runner-0.3.0.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for roblox_test_runner-0.3.0.tar.gz
Algorithm Hash digest
SHA256 e9df73432ae4ab62b6bba31413ce42f090fc2fcf74845744aa763ecd0c4fd6c1
MD5 fd33404baa7076b32916a864cc6e4b1c
BLAKE2b-256 b8bfddf94f2aa34a4fe4e132c2278ba51b42e721d5e6d615e954f51c6e5a51af

See more details on using hashes here.

File details

Details for the file roblox_test_runner-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for roblox_test_runner-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ac0cb848c2f115fcf62b94370ca7f568b8246eddcc93f5258d014fabfee4979
MD5 67be19683bde9a3752c1a8ecb45b5645
BLAKE2b-256 da49c400c8d2cc3471db0cf3211212fb3cc6cd7ce6bd6cad43070540c2063aa8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page