Yii Framework Forum: Behat/Mink support for BDD? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Behat/Mink support for BDD?

#1 User is offline   sensorario 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,796
  • Joined: 07-September 10
  • Location:Cesena (Italy)

Posted 20 February 2012 - 10:58 AM

Hi guys. I dont know if you know Behat. With Behat you can write test in natural language. And with Mink (a browser), you can run functional tests like

Scenario: User Activated can login
Given exists an activated user called "mario" with email "mario@mario.it" and password "password"
And I am on "/login"
When I fill in "Username" with "mario"
And I fill in "Password" with "password"
And I press "Login"
Then the response should contain "Welcome, mario!"
1

#2 User is offline   Jaggi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 87
  • Joined: 05-September 11

Posted 21 February 2012 - 10:58 AM

Hi again sensorario, just gonna add this is based off Ruby's cucumber project.
See my development site @ www.CodeTheInter.net (BETA)

Posted Image Posted Image

Quote

If you make it idiot proof, they'll build a better idiot
0

#3 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 21 February 2012 - 12:51 PM

Why not write an extension / demonstration / tutorial / whatever - so that we can see how Behat and Mink works with Yii ?

If it's succesful, then chances are higher that it will make it's way into the official Yii package. :)
"Less noise - more signal"
0

#4 User is offline   sensorario 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,796
  • Joined: 07-September 10
  • Location:Cesena (Italy)

Posted 22 February 2012 - 09:35 AM

jacmoe, can you help me in this stuff? I've tryied. I can share the project on github.
0

#5 User is offline   fantgeass 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 25-February 11

Posted 20 March 2012 - 11:34 PM

Can you share an example of the introduction of behat into Yii?


I have problems with include-warnings, like
Warning: include(): Failed opening 'PHPUnit_Framework_Comparator_MockObject.php'

42
0

#6 User is offline   ololo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 23-January 11
  • Location:Minsk, Belarus

Posted 13 May 2012 - 08:43 AM

hi guys, just noticed that there is Behat / YiiExtension in the official Behat github account, it looks like demostration of how to integrate behat with "other frameworks" (see this everzet's post) rather than ready-to-use yii extension, but anyway it should help you

btw, I didn't use behat with yii, but it shouldn't be a problem just to run behat on yii project: you just need to configure autoloader and provide yii app instance for the behat context
0

#7 User is offline   spamec 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 36
  • Joined: 19-February 09

Posted 26 June 2012 - 09:20 AM

Tryin to integrate behat yii extension without luck :/
0

#8 User is offline   sensorario 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,796
  • Joined: 07-September 10
  • Location:Cesena (Italy)

Posted 29 June 2012 - 09:10 AM

Yes! Me too.
0

#9 User is offline   Boontjie 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 14-September 12
  • Location:Cape Town

Posted 19 September 2012 - 04:20 AM

Have anyone made any progress on this? If not I'll get into it as well, missing a nice BDD testing framework for my Yii projects. I use it as a standard over my django projects.
0

#10 User is offline   fr0d0z 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 86
  • Joined: 25-February 11
  • Location:CO, USA

Posted 02 October 2012 - 11:42 PM

Take a look at the YiiBoilerplate wiki article: http://www.yiiframew...ure-in-seconds/

There isn't much info on Behat (you have to understand it / teach yourself how to use it), but the Boilerplate has Behat pre-setup and ready to use, along with all the Mink drivers
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users