Closed scottsym closed 1 year ago
So far, there is nothing facilitating running tests from multiple files the way you describe it. I made the choice for luaunit to only depend on natively provided libraries by lua. Thoses libraries do not have file handling capabilities, limiting the capabilities for proper multi-file testing.
I should probably consider to optionally depend on one of the filesystem libraries availble for lua to extend the capabilites of LuaUnit.
In the meantime, the only thing you can do is to explicitily put the test files in the global namespace, or to run luaunit with an explicit list of tables of tests, the list being constructed by requiring all your lua test files one by one.
Thanks for the response, @bluebird75...I was thinking of doing the latter approach, so thanks for confirming!
@bluebird75 (or others),
This is an excellent tool that I've recently started using, thank you!
The biggest thing I'm currently trying to figure out is how to best run all LuaUnit unit tests across multiple *.lua files and get a single summary report of failures from across all of those different files' test cases, if possible. Each .lua file has a table of test functions that are discovered by the execution of
os.exit( lu.LuaUnit.run('-v') )
at the the end of the file.Is there a recommended mechanism for doing this easily?
Thanks!