Open AlexanderZvyagin opened 6 years ago
I agree with @WarShoe. One of the major interest of BDD approach is the separation we have between test cases written in Gherkin language and the glue code for executable specifications. I think it won't be easy to do if you want to integrate such a feature within the header (maybe it could be necessary to create a DSL or something like that...) but this is the major reason I'm reluctant to switch from cucumber-cpp to catch2 for BDD in my projects.
Hi! I actually like the mix of Gherkin and C++. It can make unit tests readable for test-automators working with Gherkin frameworks like Behave. That way they can see what is already covered and adjust accordingly. And there already is at least one C++ framework for running Gherkin, so maybe just use that: https://github.com/cucumber/cucumber-cpp
For those looking for another C++ library with Gherkin support: I can recommed Kris Jusiak's library at https://github.com/cpp-testing/GUnit.
Have you consider to support Gherkin language directly, similar to what https://github.com/behave/behave is doing for python? The idea to separate a "test" language from an implementation (C++/python/...) is a great one, I think. Because right now Catch2 projects tries to implement both with C++, and writing tests is not as easy as in Gherkin.