Conversation
dd982d8 to
f06aac6
Compare
behat_and_ai.rst
Outdated
| Human Review and Iteration | ||
| -------------------------- | ||
|
|
||
| Generated scenarios should be reviewed to ensure they accurately represent the intended behaviour. |
There was a problem hiding this comment.
I'm not sure here whether you mean scenarios (e.g. .feature files) or the implementation of steps (e.g. in context files)?
But I think maybe we need a stronger note of caution that Behat (or any testing tool) only adds value if the tests are sufficiently robust to prove the behaviour the scenario is claiming.
Maybe something more like:
| Generated scenarios should be reviewed to ensure they accurately represent the intended behaviour. | |
| As with any specification or testing tool, generated scenarios and assertions should be reviewed carefully. It is critical to ensure that both the human-readable scenarios the executable step definitions accurately represent the intended behaviour. They also need to be robust enough to prove that the actual behaviour matches the expectations, even if the implementation changes. |
acoulton
left a comment
There was a problem hiding this comment.
Thanks @carlos-granados this is helpful, and good to highlight the benefits Behat (and BDD) can bring to agentic development.
Just a couple of notes of caution from me, to make sure users are clear on the limits of what Behat itself (/Behat + and AI) will do for you "out of the box".
behat_and_ai.rst
Outdated
| Maintaining Behaviour Over Time | ||
| ------------------------------- | ||
|
|
||
| Behat ensures that behaviour remains stable as code changes. AI agents can safely modify or refactor code, |
There was a problem hiding this comment.
Again here I think the claim is maybe a bit too strong: Behat won't protect you from an AI refactoring if your scenario & step definitions are too loose - or might add a lot of complication if they are too coupled to implementation details.
Maybe something more like:
| Behat ensures that behaviour remains stable as code changes. AI agents can safely modify or refactor code, | |
| With well-designed scenarios and step definitions, Behat ensures that behaviour remains stable as code changes. AI agents can safely modify or refactor code, |
f06aac6 to
b232c2c
Compare
|
@acoulton good suggestions, updated |
|
Thanks @carlos-granados |
Adds a documentation page explaining how Behat can be useful when using AI and which points to the new MCP server