-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add test
phase to skaffold runner
#992
Comments
One idea I'm currently toying with is treating testers in a similar way to the builders and deployers, in that Skaffold supports multiple different implementations. The only real difference is that we can allow multiple testers specified for a given artifact (whereas with builders for example Skaffold only allows one). This would keep things in line with the pluggable architecture of the builders/deployers and make it relatively easy to add new implementations. |
Other thoughts here:
|
One more set of thoughts: What would be really nice is "easy to use knobs" in skaffold to run 0 unittests, 1-2 focused tests or all my unittests in an easy way per artifact, because that's what I constantly shift around as a developer, and sometimes I even want to do structure tests and integration tests, but those are significantly more rare. |
Another idea: I just remembered using https://infinitest.github.io/ back in the day and it was working pretty well for me while doing TDD in an IDE setting. |
Unit-tests also produce artifacts: tests reports (tests results, timings, code coverage (xml, html), linters warnings stats...)
|
Multi-artifacts verification is indeed some kind of integration test, so we should reuse the deployers, but the workflow is more complicated, notably if we tag/push images to mark them as validated (for example using a release-candidate docker image registry before multi-artifact verification, then a different registry for real deployment). |
Adding discuss label to bring this back up for discussion. |
It's likely I haven't run into cases where the functionality proposed here would've been handy, but I don't see myself using it:
In other words, the way I see it: If I need to run tests in the cluster, I'd use Helm tests. If I need to run functional tests against the cluster, I'd run them from the host (which requires port forwarding). And if I need to run unit tests, I don't need Kubernetes at all. I believe skaffold can be improved to make testing easier, but what I'm missing is already covered in #4022. And it's a far simpler change. |
To add to the discussion, we have several potential use cases. I'm not sure which would be the best to add support for directly in skaffold (or more generally which should or should not be done in general):
|
Thanks @thomas-riccardi We are working on a PRD and this seems very helpful. |
we're expanding on our testing story in 2021, but the |
We've had a few out of band discussions about this so opening a broader issue here to track.
I'm considering adding a
test
phase that the runner executes betweenbuild
anddeploy
to complete the story, with thedeploy
phase relying on all the tests to pass. This could potentially be extended to support other types of tests in the future, either specified by us or by the user through custom scripts, etc. Opening this issue for discussion, any suggestions, specific use cases or feedback welcome.The text was updated successfully, but these errors were encountered: