Lua Test Adapter and Framework
Features
- Automatically discovers test functions that begin with "test_" from .luatests files
- .luatest files can include other .lua files using require or dofile
- Automatically update test list when any .lua or .luatest file is updated
- Automatically executes tests when any .lua or .luatest file is if "Run tests after build" is selected in the Visual Studio Test Explorer
- Executes testframework_setup and testframework_teardown functions (if found) before/after each test
Installation
- Install from Visual Studio Gallery
Usage
- Create a .luatest file in any Visual Studio project
- Include any additional .lua files using require or dofile
- Start any test fuctions with test_ and use assert() or throw errors for failures
- Create a testframework_setup or testframework_teardown function if you have code that must be run before/after each test
Known Issues / Limitations
- Issue #1 Currently all tests will always be executed, even if you select a subset of tests
- Issue #2 Currently all tests must finish executing before results are displayed
Feedback
Please send your feedback/issues/feature requests! :-)