-
-
Notifications
You must be signed in to change notification settings - Fork 743
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
Code Suggestion: add testing framework and tests #545
Comments
Definitely, agree. I want to automate a lot of the testing because what ends up happening is that I make a bunch of containers with Docker to test the functionality of it. If we can get something started, I'm happy with the suggestions here. |
Started work in: https://github.com/shadowspawn/n-test |
An update. I spent some time on this at start of year, and have a functional setup and initial suite of tests in https://github.com/shadowspawn/n-test. Can open a PR when wanted. I have ideas for improvements and additions but a low priority at the moment and I am not planning to change approach significantly (despite #554 #555). Easy to add travis support if desired. Infrastructure:
The current tests are focused on installs. (With some redundancy as more tests got added.)
|
Added to |
Included in v4.0.0 |
Problem
n
does not have any tests for contributors to run after making changes, to add to when making changes, or to prevent regressions. I would like the reassurance that the tests still pass when making a Pull Request, or similarly when reviewing a Pull Request. (End users would hopefully benefit from the increased checks with more robust releases, but would not run the tests themselves.)The Pull Request template asks a good question and I don't think there is currently a good answer:
Possible Solutions
I looked around and found bats-core, which is quite widely used. I liked the strong focus on bash, and test and output formats
Using a caching proxy is an optional optimisation for the multiple web requests. On Mac, I have used mitmproxy
Using
docker
allows running commands or test suite on multiple flavours of operating system, all self-hosted.Feedback
I am interested in any comments (including of course from maintainers!).
I develop primarily on a Mac, and use Linux flavours in VMs and containers as needed but not as my desktop, so found technology that works well for my situation. I know @troy0820 uses docker, and might be on a Mac too. There may be other frameworks or approaches that would work better for
n
contributors with other environments?A framework for providing and running tests is separate from writing the tests themselves. Any comments on good tests also welcome.
I am aware I don't need to get this into
n
to use, as I can make a stand-alone repo for hosting the tests. I have usedbats-core
andmitmproxy
anddocker
together to write tests for nvh so know I can get something functional.History
Having some tests gets mentioned as desirable in #246. A roll-your-own framework and a single test was included with PR #364.
The text was updated successfully, but these errors were encountered: