busted
Busted is a lightweight Lua unit testing framework designed for simplicity and readability. It supports modern Lua versions (5.1+), includes mocks and spies for functional testing, and offers multiple output formats including JSON and TAP for CI integration.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | lunarmodules/busted |
| Owner | lunarmodules |
| Primary language | Lua |
| License | MIT — OSI-approved |
| Stars | 1.6k |
| Forks | 205 |
| Open issues | 67 |
| Latest release | v2.3.0 (2026-01-07) |
| Last updated | 2026-03-19 |
| Source | https://github.com/lunarmodules/busted |
What busted is
Busted provides a BDD-style testing DSL with chainable assertions, spy/mock capabilities, and modular output adapters. It runs on Lua >= 5.1, LuaJIT >= 2.0.0, and MoonScript, with distribution via LuaRocks and Docker containers for isolated execution.
Get the busted source
Clone the repository and explore it locally.
git clone https://github.com/lunarmodules/busted.gitcd busted# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Install via LuaRocks (`luarocks install busted`) or build Docker image; MoonScript dependency required for core testing but optional for end users.
- Test specs use `describe` and `it` blocks; assertion chaining (e.g., `assert.is_not.equal`) requires learning DSL conventions.
- Spy/mock setup requires explicit module imports and `spy.on()` calls; no automatic isolation between tests—state management is manual.
- Output format selection via CLI flags; JSON streaming and TAP formats are production-ready but require format-specific parsing downstream.
- Docker execution useful for isolation but adds container startup latency; recommended for CI, not local development iteration.
When to avoid it — and what to weigh
- Lua applications with complex system dependencies — Docker support is limited for projects requiring system libraries or external C modules. Manual dependency management inside containers adds overhead.
- Performance-critical testing at extreme scale — No documented benchmarks or optimizations for very large test suites. Framework overhead characteristics unknown for 10,000+ test scenarios.
- You need enterprise-grade test reporting and analytics — Output formats are standard (TAP, JSON, plain text). Custom reporting integrations or metrics dashboards require custom development.
- Non-Lua test ecosystems requiring language polyglot testing — Framework is Lua-specific. Integration with polyglot test runners or multi-language CI environments requires custom orchestration.
License & commercial use
MIT License (2012–2020 Olivine Labs, LLC). Permissive OSI-approved license permitting commercial use, modification, and redistribution with attribution.
MIT license permits commercial use without restriction. No proprietary or copyleft obligations. Suitable for closed-source and open-source projects alike. Verify any dependency licenses (e.g., MoonScript) for your specific use case.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Security posture not explicitly documented. Standard concerns: test code has access to application internals (by design); spy/mock APIs can be misused to leak sensitive data in test logs. No published security advisories found in provided data. Review dependencies (MoonScript) for known CVEs before production use. Docker images based on Alpine Linux; inherited supply-chain considerations apply.
Alternatives to consider
pytest (Python) / Jest (JavaScript)
Language-specific alternatives with larger ecosystems and IDE integration. Consider if Lua is not your primary language or if you need polyglot testing.
Lua-native: lunit, cwtest
Simpler, minimal-dependency Lua testing frameworks. Choose if busted's DSL overhead is unwanted or if you need extreme lightweight testing.
Commercial test platforms (TestRail, Zephyr)
Enterprise test management with reporting dashboards, traceability, and team collaboration. Choose if regulatory compliance or formal test documentation required.
Build on busted with DEV.co software developers
Start with `luarocks install busted` or pull the Docker image from GitHub Container Registry. See the official docs at lunarmodules.github.io/busted for examples and advanced patterns.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
busted FAQ
Can I run Busted in CI without Docker?
Does Busted support parallel test execution?
How do I integrate Busted output into my monitoring/alerting stack?
Is Busted suitable for embedded Lua or game development?
Custom software development services
DEV.co helps companies turn open-source tools like busted into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source testing stack.
Ready to adopt Busted for your Lua projects?
Start with `luarocks install busted` or pull the Docker image from GitHub Container Registry. See the official docs at lunarmodules.github.io/busted for examples and advanced patterns.