Replies: 3 comments
-
Existing examples on using ginkgo+gomega for E2E testing. K8S FRP |
Beta Was this translation helpful? Give feedback.
-
I put my vote in for going with option 1 using Ginkgo to enable BDD as seen by examples such as the following:
I would argue that option 2 should be what you listed as an alternative godog which implements cucumber with golang.. Roll-your-own cucumber.io with golang I don't think makes sense. I like the idea of having Gherkin language to define BDD versus the Gherkin-like lingo from Ginkgo. The risk with this is that you're taking a dep on godog and there likely will be gaps/updates and breaking changes (it's still not 1.0). |
Beta Was this translation helpful? Give feedback.
-
Hi @qweeah
I tried installing Ginkgo also then also the same error. |
Beta Was this translation helpful? Give feedback.
-
What is Needed
End-to-end tests that continuously validate the functional correctness of oras features.
Why it's Needed
How to
Setup Test Environment
The E2E tests should run against oras CLI binary with oras-distribution as the backend.
Choose Test Framework
Technically, there are two different directions of tools we use to build E2E test suite:
1) Use golang-native test framework to run test based on Cobra command execution calls
ginkgo + gomega
Use Cobra command execution call to mock user input, not 100% E2E.(update: Gomega supports starting external binaries)2) Use common Behaviour-Driven Development (BDD) tools to test the built out binary
Gherkin + godog
Both options provides expressive assertion that can meet oras' testing need.
Future Works
Below items are valuable but not in scope of this discussion:
If you have any other ideas or suggestions on building the E2E test suite for oras, feel free to response below. Any comments are highly appreciated 🍻
Beta Was this translation helpful? Give feedback.
All reactions