Open tk3369 opened 3 years ago
When you have time, have a look at the documentation for this at
https://github.com/erikedin/Behavior.jl/blob/master/docs/src/usage.md
It's currently at the bottom. You'll basically be able to define hooks like
@beforeall() do
# Some code here
end
@afterall() do
# Some code here
end
Does this work for you? If it does, you can close the issue, else we'll keep it open and work on it.
Since these hooks take no arguments, since no context
object is available yet, they can only create global resources. Is that a problem for you?
It would be great, if we could have a context at least for @afterall so we can use this to delete all databases or something else.
If all tests are green it isn't a problem. But most of the time you work on tests and it crashes or you haven't all tests made and the the work will not be finished. Sure, I could made a separate client or session and make what I want. But this implies two places where I have to determine the server and the port.
Add
@beforeall
and@afaterall
macros such that they run immediately before and after execution. Note that there's a similar issue #17 for steps. It may be good to implement these at the same time.For reference, Python's behave package documentation about this can be found at https://behave.readthedocs.io/en/stable/tutorial.html#environmental-controls
This enhancement is required to support Grakn client. See master issue #44.