These are chat archives for Behat/Behat

Oct 2017
Abdul Wahhab Qureshi
Oct 27 2017 09:53 UTC
@kisse91 You can do pretty much what you want with behat as its just php execution sat behind a step definition. But that negates the purpose of this tool. you're better off using phpunit or a different tool like codeCeption.. Your question is interesting, as you're saying that you don't want to test login with bdd-style. Is this because you've already tested in another feature file and don't want to retest it in another, or you just don't want to have it in your feature files at all? In the first case, you can just make a step definition that does the entire login process for you "Given I am logged in", this step definition can do clever stuff to bypass the login phase such as fudge the session (if you've stored in an external source such as Redis), and you'll be logged in in milliseconds. The second way, yeah that would be a bit odd to not have it at all if your features require you to be logged in. But login is essential, i would definitely have it in one of my feature files as a complete and step by step test, then i'd use a step definition to bypass it as quickly as possible. Hope this helps.