-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We need a test suite #527
Comments
I think rather than using |
Ok, so... I wrote a script with Github Actions, but I'm not sure how to implement the widget tests. Right now i just |
If you want to see what I've done so far, check the actions branch over here. |
Hello, That's nice to see some effort in this direction. The more the Awesome WM ecosystem (awesome itself and third-party modules / dependencies) has automatic test, the more it can be considered as mature and stable. Regarding our tests at Awesome, we have a similar test suite for our integration tests than the one you propose here : https://github.com/awesomeWM/awesome/blob/master/tests/run.sh. It starts Xephyr and run step-by-step tests withing a graphical instance of Awesome. I think, the biggest downside of it, is that it's a homegrown tool, so not exactly what you expect from a conventional/standardized tool, and you have to learn it from scratch. It's not hard, but I'm not sure how easy it would be to reuse a similar script on another context, like for the lain module. Unit testing is done with busted (https://olivinelabs.com/busted/). Because unit tests don't load a full working environment with Awesome, but only the part that is tested, we need to mock dependent modules in our tests, and to have this preload script (https://github.com/awesomeWM/awesome/blob/master/spec/preload.lua). It's a common annoyance of unit testing that you can't avoid. I'm also not sure how bad it would be for third-party modules. (just my 2cts about CI testing Awesome WM) |
The idea is to have a
lain-test.lua
, which requireslain-test-{util, widget, layout}.lua
, each of which requires all elements of the respective submodule with all possible options set. Tests could be performed with Xephyr as follows:This structure and workflow will serve as a unit, integration and system test suite.
They will also be used to do regression testing for each new commit (e.g., using Travis CI).
The text was updated successfully, but these errors were encountered: