Closed jeremy-wl closed 5 years ago
/cc @awgreene @kevinrizza @SamiSousa
Ok, I'll be the devil's advocate, again :)
I strongly discourage using behave for the purpose of integration testing, as it's not really suitable to test these kind of applications on the long run.
I had a really bad experience setting up an entire integration test suite for OSBS, which was based on behave, and which was ultimately migrated to pytest in order to improve maintainability and ease further development.
Behave introduces a layer of abstraction which is hard to work around when testing APIs or CLIs. Behave is suitable for testing applications or services, where the functionality can be described in relatively simple human terms. Operator Artifacts are beyond that, I think, and as such the language of the scenarios will become convoluted and hard to follow.
Hi @csomh, thank you very much for your advice. Could you provide some concrete examples or scenarios why behave
might be poorly suited for operator-courier? I current don't have issues with this framework as it does what I want it to do, and switching to something else would take extra effort.
Also, I have set up a group chat on slack with @kevinrizza, feel free to reach out to us there to discuss in depth.
Closing it because we decide to use pytest
instead of behave
for integration tests.
The integration tests currently only test the
verify
command. For thepush
command, we need to set up quay access token as environment variable. Due to some restrictions from Travis CI,We decided to include it later and run those tests directly on master, and trigger Travis CI builds periodically with cron jobs. Details are yet to be decided.