Modern PHP testing for everyone.
Selenium WebDriver, PhpBrowser. Data cleanup. Continuous Integration. Remote CodeCoverage.
Symfony2, Laravel, Yii, Phalcon, Zend Framework, Kohana, Databases, REST, SOAP, CodeCoverage.
REST, SOAP, XML-RPC via PHPBrowser or PHP Frameworks.And Unit Testing powered by PHPUnit.
If you develop complex web applications with forms, then you need to use a testing framework. A testing framework allows you to test all links, forms, pages, APIs, and anything else in just minutes using automated test scripts.
PHPUnit has very limited features for functional testing with Selenium or other backends. Codeception is PHPUnit on steroids. Everything you need for testing is built-in, and 'just works' out of the box. No more pain in configuring Selenium, data cleanup, writing XPaths, or fixtures.
Unlike Behat, Codeception tests are written in PHP. They are flexible and easy to write. You can use variables and operators, CSS and XPath locators in your tests. These features allow you to build a solid test automation platform for testing your web application. Codeception tests are simple and readable for your developers, managers, and QA team.
Codeception works great with Selenium. But with Codeception you can write your tests in PHP. The main reason is: Selenium IDE tests are tightly bound to XPath locators. If you ever change anything in the layout, tests will fail. Codeception locators are more stable. You can use names, labels, button names and CSS to match elements on page. It's much easier to support the Codeception test then Selenium's. Codeception can clean data between tests, can check database values, and can generate code coverage reports.
Sure, you can use Codeception for black-box testing of your legacy applications. But in the same manner you can start testing modern web application as well. With modules that integrates with all popular PHP frameworks you can start writing functional tests in seconds. Unit tests? Write them as you do in PHPUnit with some enhancement. Codeception keeps your tests in one place, makes them structured and readable.
This test can be executed inside Mozilla Firefox using Selenium Webdriver, or any browser. You can also execute this test without any browser by using a PHP browser emulator based on CURL.
This test can be also executed as a functional test in one of the popular PHP frameworks. Codeception has modules that support Symfony2, Zend Framework and Kohana.
This test can be executed inside PhpBrowser or as a functional test of one of the most popular PHP frameworks.
PHPUnit test format with some useful helpers. In this test we check that value was saved to database with one simple command 'seeInDatabase'.Read more about Unit Tests →
A side-project of Codeception for unit testing any PHP code. AspectMock most powerful mocking framework that can stub and mock practically anything. Even static methods, can be tested now. Use it for legacy or untestable code.Install AspectMock →