-
Notifications
You must be signed in to change notification settings - Fork 84
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
end-to-end test example #366
Comments
While this is fine, in my opinion, it's much more practical to have tests work on In a Rust project, even with A developer should only need to run a Obviously in your CI you also want to run them, bu then instead of building individual packages, just build a whole workspace in one derivation, and use it in test IMO, it's a vital piece of advice, and if you don't follow it your developers are going to hate you, waiting for tens of minutes "for Nix to build, just to run the test", dreaming about "something faster" like in this story: https://mmapped.blog/posts/17-scaling-rust-builds-with-bazel.html |
@lelgenio I'd be happy to include a potential example which shows off how to apply such a technique to those who really do want or need to run such tests as a derivation (or via hydra)! So long as the example is clear/self contained and doesn't get too complex to follow, but we can always iterate Also worth noting that you can also set up nixos tests which basically spin up different VMs (e.g. you don't need to run the database in the same script, it could be a separate machine. not sure how reusing that machine with different tests works though since I haven't used it myself)! |
BTW. (sorry for a bit tangential topics, but I think it's powerful and not well know). In our project we run all e2e tests (which includes various combinations of > 10 instances of various daemons, etc.) in parallel , each in a different Linux network namespace (so they don't collide w.r.t port numbers etc.). No container rebuilding, no VMs, no waste. I don't know of any MacOS corresponding way (it's kind of an OS for media consumption, not real dev work... 😆), but MacOS developers can still run each script individually, and running everything in parallel is mostly useful for CI anyway. |
Closed with #368 🎉 |
One thing I've found to be pretty useful is running E2E tests as a nix derivation. I'm thinking of cleaning up and contributing this as an example, but requesting some comments before.
Maybe this sort of thing is best left to a separate project?
The text was updated successfully, but these errors were encountered: