kfirba
93
13
General

Behat suites and contexts

Posted 3 years ago by kfirba

Hello!

By watching laracasts lessons I really grew to love Behat. However, there is one thing I can't get right.

As Jeffrey says, we should write our features in a more general way so we don't explicitly bind our feature to the UI (Acceptance) or to just one testing suite. In some videos I can see that he has the following folders:

  • Acceptance
  • Functional
  • Integration
  • spec

I believe spec belongs to PHPSpec, no problem there.

I saw that he stores some of his .feature files in the Acceptance folder. Does it mean he has it cloned in the Functional and Integration folders so he can run the same .feature against a different suite?

In general I think I'm a little bit confused about the contexts and suites, can anyone please arrange the mess in my mind?

How can I even create multiple suites and contexts? Does a context belong to a suite? If I have xContext in Acceptance/bootstrap does it mean I need another xContext in Functional/bootstrap for example?

Thanks in advance!

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.