Yii Framework Forum: Yii Codeception Module - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Yii Codeception Module Rate Topic: ***** 1 Votes

#21 User is offline   jacmoe 

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

Posted 06 May 2013 - 09:25 AM

I also see that you wrote some helpers for Codeception - like login, etc. Looks like it could be useful.
Any license on those things?
"Less noise - more signal"
0

#22 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 06 May 2013 - 09:26 AM

I am not using the dump.sql file, but I think it has to be defined in the config.
I use migrations to setup the test db, although they were not created for that purpose.

But for the details you've to talk to @Ragazzo.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
1

#23 User is offline   jacmoe 

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

Posted 06 May 2013 - 09:29 AM

I will put a random db dump in there - thanks for the hint.
((Actually, I will put a dump of the real db, sans data))
Migrations sounds like a great idea!
"Less noise - more signal"
0

#24 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 06 May 2013 - 09:35 AM

View Postjacmoe, on 06 May 2013 - 09:25 AM, said:

I also see that you wrote some helpers for Codeception - like login, etc. Looks like it could be useful.
Any license on those things?


Was this question for me or Ragazzo? ... if it was for me, all stuff I publish on github is BSD licensed.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#25 User is offline   jacmoe 

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

Posted 06 May 2013 - 09:39 AM

Question was for you, of course. Thanks. :)
I will ask more later when I have un-confused myself.
"Less noise - more signal"
0

#26 User is offline   Ragazzo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 12-August 12

Posted 06 May 2013 - 12:49 PM

Quote

I am using fixtures in Yii, but that doesn't seem to work with Codeception.

You can use them with Codeception only in phpunit tests, so like
MyCodeceptionYiiPhpunitTest extends CDbTestCase
{
}


About article, yes, i've finished it yesterday, it is now up to DavertMik to make maybe some markup editions or smth. else. Article mainly about some codeception features (CEST classes), my "vision" of BDD and differences between acceptance and functional tests, difference between Behat+Mink and Codeception and why do i prefer Codeception over Behat+Mink, and about using Codeception with CI Jenkins (basically through phpunit Jenkins plugin). So whole article is divided in this 3 parts.

Also, @schmunk can i ask you (if you of course will have time) about maybe writing article or some brief-look of codeception too?)) I mean that if someone using codeception feel free to share with community your experience)

Also if that article will be interested for users, maybe i will write one more about codeception event-handling and groups(similar to tags in behat). For now afaik DavertMik writing code for "groups" feature.
0

#27 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 06 May 2013 - 01:45 PM

@Ragazzo: For sure you can ask, but ... I am like a testing noob, can't really write an article about codeception ;) and I really don't have the time at the moment. Sorry.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#28 User is offline   Ragazzo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 12-August 12

Posted 06 May 2013 - 02:03 PM

Yes, time is that we all need)) ok, hope you like codeception and write more tests with it ;)
0

#29 User is offline   Ragazzo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 12-August 12

Posted 07 May 2013 - 02:41 AM

Well, guys there is a first of three part of that article is now available, thanks to DavertMik)
http://codeception.c...-coparison.html
Please feel free to comment, and maybe add some suggestions.
1

#30 User is offline   Ragazzo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 12-August 12

Posted 11 May 2013 - 02:27 AM

Hi guys, so after new Codeception release 1.6.1 , second part of the article was released, it contents some recipes on how to use new CEST classes formats and some differences between CESTs and CEPTs.
http://codeception.c...with-cests.html
Also pay attention to recipes that was written by davertMik http://codeception.c...7-AdvancedUsage . It also contents new features overview, such like groups.
1

#31 User is offline   Ragazzo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 12-August 12

Posted 24 May 2013 - 02:22 AM

So, last chapter (3 of 3) of my recipe-article is available on Codeception site, some useful tips and tricks:
http://codeception.c...i-practice.html
Thanks for support on github too ;)
1

#32 User is offline   Bogsey 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 19-June 12

Posted 14 November 2013 - 05:52 AM

Hi,

I'm having problems with the autoloader. If I run a suite of tests individually (eg unit or functional) no problems, but if I try to run all tests for the project then I run into problems with loading the modules.

It seems that it pre-loads all modules before running any tests. It loads the functional test modules first which includes Yii1, then it loads the unit test modules but because Yii1 has included Yii, it tries loading through YiiBase::autoload which then cannot find '[yii base path]/../../Codeception/Modules/Yii1.php' for example.

Any ideas on what I'm doing wrong?
0

#33 User is offline   Ragazzo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 12-August 12

Posted 01 December 2013 - 05:41 AM

Bogsey, sorry for the late answer, yes seems like problems in autoloaders, anyway i suggest for Yii1 functional tests use PhpBrowser and for acceptance WebDriver, there were some problems due Yii1 architecture, good to know that they are solved in Yii2.

Also you and other developers can help us to test Yii2 and Codeception integration for yii2-advanced/yii2-basic boilerplates. See this PR for comments/suggestions:
https://github.com/y.../yii2/pull/1372

Thank you and all yii developers that help Codeception :)
0

#34 User is offline   The Peach 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 08-October 09
  • Location:London, UK

Posted 26 March 2014 - 12:43 PM

Hey Ragazzo, after you hinted me about Codeception, I've given it a go, and I'm really pleased so far.

Great job on the articles you wrote as well.
I'm planning to present it to our next Yii London Meetup.

Anyway, I didn't have any problems in working with functional tests (namely Codeception, Yii1, PHPBrowser) and it has proved to be a smooth operation so far.

Now I'm facing some doubts regarding Unit tests (probably because I miss a bit of knowledge of the internals).
I prefer to post it here before I start getting mad doing trial&error to make them work.

The Yii1 module should be loaded for Unit tests as well?
The access to Yii internal functions (such as Yii::app() etc) is it done through the Module accessor of Codeception? (see http://codeception.c...itTests#Modules)
Anything else I should be aware of regarding unit tests?
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

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