Merged
Conversation
Contributor
Author
Contributor
Author
|
Hi @reinecke, could you please take a look at this too |
reinecke
requested changes
Feb 28, 2022
Member
reinecke
left a comment
There was a problem hiding this comment.
In terms of isEnabled - one small question on deprecating the old constructor.
On BDD testing:
I support migrating to spock tests for our Java implementation, however I would prefer that we do that its own separate PR.
In terms of BDD testing in python, I think that choice is entangled with some language-specific details (like which frameworks we use, what the current best practice in the community is), so we should have that discussion on an issue in the main repo.
Contributor
Author
|
@reinecke this PR only has the wrapper for the new flag now. I think this is good to merge. |
reinecke
approved these changes
Apr 5, 2022
Member
reinecke
left a comment
There was a problem hiding this comment.
Thanks for taking care of this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #56
This PR adds:
The idea of BDD testing is to write tests in a simple user/business friendly manner. The tests become a documentation in themselves. For example:
If we want to write a simple test to see if disabling an
Itemworks...The BDD specification would be like:
And the code would be like:
The PR has the same tests, both in the unit testing format and BDD format, for comparison.
I've used spock, a groovy BDD testing framework. It might be a lot of effort in the beginning but once you get used to it, it becomes simpler and clearer. It'll also be helpful to community members new to the project. The current tests might not be very clear to them.
Spock also has an extension spock-reports that generates nice HTML test reports. But I haven't been able to get it working with the bindings yet.
Any thoughts on taking this forward? Or should we continue writing unit test as we do right now?
If we do take it forward, we might also want to adopt this for the python bindings. There are plenty of frameworks available, but in particular
pytest-bddis compatible with pytest. (Framework comparison)@reinecke @meshula @jminor @ssteinbach