Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Add Cucumber/Gherkin based integration tests #504

Merged
merged 1 commit into from
Apr 27, 2023
Merged

Add Cucumber/Gherkin based integration tests #504

merged 1 commit into from
Apr 27, 2023

Conversation

sophokles73
Copy link
Member

I have implemented a few basic integration tests against a running Databroker.
The tests have been implemented using the Cucumber framework
which allows specifying test scenarios using natural language following
Gherkin syntax.

The general idea is to implement basic functionality for interacting with the
system under test (the Databroker) and asserting outcomes. Based on this
functionality, one can then easily add more tests by simply writing additional
test scenarios.

@SebastianSchildt
Copy link
Contributor

Cucumber looks interesting, though I never looked into it any deeper. Could you maybe present what you did (and what would need to be done to extend the scope of this tests) at the next KUKSA community call (Thursday 16th 13 CET, see here https://eclipse.github.io/kuksa.website/resources/ for link)?

@sophokles73
Copy link
Member Author

Sure, I can do that.

@@ -21,6 +21,7 @@

MAP = {
"Apache-2.0": "Apache-2.0.txt.gz",
"BlueOak-1.0.0": "BlueOak-1.0.0.md.gz",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this license coming from? I see the cucumber create added below, but that is just APACHE2 or MIT according to crates.io . Is this from some transitive dependency?

In case you know, is this a dependency that is used only during build time or is it a runtime dependency? Or only at runtime for tests?

It "looks" harmless (https://spdx.org/licenses/BlueOak-1.0.0.html) but in any case, we need to clear it with Eclipse. But first we need to know where it comes from. If you can tell us @sophokles73 , maybe @bs-jokri can try pushing it through dash, to see whether it is maybe already cleared

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is introduced by a transitive dependency of cucumber. As such, it is only required for building/testing but not during runtime.

@SebastianSchildt
Copy link
Contributor

SebastianSchildt commented Mar 16, 2023

It seems like a pretty cool concept to me. Any opinions by other guys? I already "got the tour" from @sophokles73 , I think he is happy to show anyone else as well.

Speaking of this PR specifically, if we want to move forward with this, the main two open points are

  • getting the new license/dependency cleared (I can work on that)
  • an opinion, maybe from @argerus w.r.t to the changes done in this PR to Cargo and the "invasiveness" of the code in databroker. Feels fine to me, but you have a better overview. Obviously, when hacking databroker, tests might fail, or when we change som design or apsect of the API, tests need to be adapted, but that is sort of the point :)

@SebastianSchildt
Copy link
Contributor

Ping @argerus: Should we move forward with this? It has been open quite some time (and meanwhile needs rebasing). We should decide, and if we want it, rebase & merge.

I "like" it, but that is not a very technical argument. Any opinions?

@argerus
Copy link
Contributor

argerus commented Apr 12, 2023

Should we move forward with this?

I thought we where waiting for the license approval (from Eclipse), since this PR adds a license which we haven't whitelisted yet...

@SebastianSchildt
Copy link
Contributor

Ah good point, I need to follow up on that. Assuming it is fine, we want this?

@argerus
Copy link
Contributor

argerus commented Apr 12, 2023

Yes, I've postponed reviewing it in detail (given that we're waiting for license approval).
But in general it looks good, and it's definitely something that would benefit the project when merged.

@sophokles73
Copy link
Member Author

@argerus @SebastianSchildt I have rebased to current HEAD ...

@SebastianSchildt
Copy link
Contributor

license-wise I think we can merge this. BlueOak "looks fine to me", and we have a (relatively fresh) CQ open Eclipse side. This is "only" a test dependency, and worst case can be pulled. We have some CQs from other dependencies already "in" open for > 1 month now. So let's get this up to date and merged based on our best understanding, and react on anything that might come out of the CQs

@sophokles73
Copy link
Member Author

Then I can rebase again (one last time?) ;-)

@SebastianSchildt
Copy link
Contributor

@sophokles73 Pretty please with a 🍒 on top

Cucumber has been added as a test dependency.
Several integration tests against a running Databroker have been
implemented using textual scenario descriptions following the
Gherkin syntax.

Signed-off-by: Kai Hudalla <[email protected]>
@SebastianSchildt SebastianSchildt merged commit 3fe7ccc into eclipse:master Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants