Well, yes, as for me, my folders structure is like that:
tests/
codeception/ #all codecepiton tests goes here (codecept.phar bootstrap command)
functional/ #some end-to-end tests with behat by itself
unit/ #some unit-tests with phpunit
I also think that maybe you can use PhpBrowser it set more request headers and other params because it involves server, for now i am not using Yii1 module and switched to PhpBrowser for functional tests because of some problems with cyrillic and not-standart symbols in Yii1 module. PhpBrowser also as fast as tests with symfony browser kit with Yii1 module.
I briefly toyed with the idea of using composer, but … you know, it’s just a simple wget and that’s it.
I gave up, actually.
I accidentally ran the sample code for Yii as acceptance test and it gave me an OK, even though none of the tests were actually true.
And then I ran into db issues, etc.
But might tackle it again.
The documentation is really scarce, and assumes a lot of things (like prior exposure to Codeception, which is silly, actually), I also looked at your setup, but it didn’t work. Mainly due to db failures…
I see that you are using a dump.sql file?
I might try that.
Does it work against MySQL?
I am using fixtures in Yii, but that doesn’t seem to work with Codeception.
I will probably use a data mock library/tool and generate a test db.
One last thing: do you need to set up the PHP 5.4 browser? From php.ini, I mean?
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.
@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.
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.
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.
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:
Thank you and all yii developers that help Codeception