Fooservice, that you can just do
behat --init FooService(or w/e it is)
I have a few of Ciaran McNulty's videos and for the most part I think I understand that tests should be "declarative", not "imperative". However, I am trying to test an API which uses events to drive an infrastructure service, but I can't really think of good tests. The best I can think of are tests like
Given I have payload ... When I POST ...
Given I have a machine When I set the machine to process Then it will be "processing"
The problem with the second one is that it's a clear attempt to transcribe a state machine to a gherkin feature. I once replied to a state-machine question on SO with the example of an oven where in the idea was that an oven is HEATING when the oven is ON and below a temperature. With that simple scenario you can describe your tests with business rules and naturally come up with a state-machine as an after-thought. But in this kind if situation, the criteria for actions such as moving the machine to a processing state is just "I want the machine to start processing" ... so their aren't really any business rules around it. It is a requisite that you move the machine through states via the API, but that's about it.
Idk, maybe it's foolish to avoid trying to write a test that just checks state. There is that at least:
Given the machine is in state A And I move the machine to state B When I move the machine to state C Then it will be in state C
It just doesn't seem like a super productive ruleset.
Behat\Mink\Element::findAllreturns null, and I get an
ElementNotFoundException. I took a look at the generated xPath, and it looked really over-complicated(but might still have been valid).
fillFieldfailing - it's because ChromeDriver is defaulting to W3C mode, which isn't supported yet. Need to disable W3C mode in the behat.yml file (or however you're configuring your behat instance)
ArtifactExceptionInterfaceare thrown. I have afterStep/afterScenario hook that can take screenshots, but at that point it's too late - formatter already has gotten it's exception and I cannot access it from AfterStepScope (it's Behat 3). I could also throw my own exceptions, but most basic steps are from MinkContext and RawMinkContext which use WebAssert class that throws it's own exceptions (in private methods).