Alexander Makarov
7 years ago
committed by
GitHub
6 changed files with 99 additions and 131 deletions
@ -1,11 +1,17 @@
|
||||
Acceptance Tests |
||||
================ |
||||
|
||||
> Note: This section is under development. |
||||
Acceptance test verifies scenarios from a user's perspective. The application tested is accessed via either PhpBrowser or |
||||
a real browser. In both cases the browsers are communicating via HTTP so application should be served via web server. |
||||
|
||||
Acceptance testing is implemented with the help of Codeception framework which has a nice documentation about it: |
||||
|
||||
- [Codeception for Yii framework](http://codeception.com/for/yii) |
||||
- [Codeception Acceptance Tests](http://codeception.com/docs/03-AcceptanceTests) |
||||
|
||||
Running basic and advanced template acceptance tests |
||||
---------------------------------------------------- |
||||
## Running basic and advanced template tests |
||||
|
||||
If you've started with advanced template, please refer to ["testing" guide](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-testing.md) |
||||
for more details about running tests. |
||||
|
||||
Please refer to instructions provided in `apps/advanced/tests/README.md` and `apps/basic/tests/README.md`. |
||||
If you've started with basic template, check its [README "testing" section](https://github.com/yiisoft/yii2-app-basic/blob/master/README.md#testing). |
||||
|
@ -1,11 +1,22 @@
|
||||
Functional Tests |
||||
================ |
||||
|
||||
> Note: This section is under development. |
||||
Functional test verifies scenarios from a user's perspective. It is similar to [acceptance test](test-acceptance.md) |
||||
but instead of communicating via HTTP it is filling up environment such as POST and GET parameters and then executes |
||||
application instance right from the code. |
||||
|
||||
Functional tests are generally faster than acceptance tests and are providing detailed stack traces on failures. |
||||
As a rule of thumb, they should be preferred unless you have a special web server setup or complex UI powered by |
||||
JavaScript. |
||||
|
||||
Functional testing is implemented with the help of Codeception framework which has a nice documentation about it: |
||||
|
||||
- [Codeception for Yii framework](http://codeception.com/for/yii) |
||||
- [Codeception Functional Tests](http://codeception.com/docs/04-FunctionalTests) |
||||
|
||||
Running basic and advanced template functional tests |
||||
---------------------------------------------------- |
||||
## Running basic and advanced template tests |
||||
|
||||
If you've started with advanced template, please refer to ["testing" guide](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-testing.md) |
||||
for more details about running tests. |
||||
|
||||
Please refer to instructions provided in `apps/advanced/tests/README.md` and `apps/basic/tests/README.md`. |
||||
If you've started with basic template, check its [README "testing" section](https://github.com/yiisoft/yii2-app-basic/blob/master/README.md#testing). |
||||
|
@ -1,28 +1,24 @@
|
||||
Unit Tests |
||||
========== |
||||
|
||||
> Note: This section is under development. |
||||
|
||||
A unit test verifies that a single unit of code is working as expected. In object-oriented programming, the most basic |
||||
code unit is a class. A unit test thus mainly needs to verify that each of the class interface methods works properly. |
||||
That is, given different input parameters, the test verifies the method returns expected results. |
||||
Unit tests are usually developed by people who write the classes being tested. |
||||
A unit test verifies that a single unit of code is working as expected. That is, given different input parameters, |
||||
the test verifies the class method returns expected results. Unit tests are usually developed by people who write the |
||||
classes being tested. |
||||
|
||||
Unit testing in Yii is built on top of PHPUnit and, optionally, Codeception so it's recommended to go through their docs: |
||||
|
||||
- [PHPUnit docs starting from chapter 2](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html). |
||||
- [Codeception Unit Tests](http://codeception.com/docs/05-UnitTests). |
||||
- [Codeception for Yii framework](http://codeception.com/for/yii) |
||||
- [Codeception Unit Tests](http://codeception.com/docs/05-UnitTests) |
||||
- [PHPUnit docs starting from chapter 2](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html) |
||||
|
||||
Running basic and advanced template tests |
||||
----------------------------------------- |
||||
## Running basic and advanced template tests |
||||
|
||||
If you've started with advanced template, please refer to ["testing" guide](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-testing.md) |
||||
for more details about running tests. |
||||
|
||||
If you've started with basic template, check its [README "testing" section](https://github.com/yiisoft/yii2-app-basic/blob/master/README.md#testing). |
||||
|
||||
Framework unit tests |
||||
-------------------- |
||||
## Framework unit tests |
||||
|
||||
If you want to run unit tests for Yii framework itself follow |
||||
"[Getting started with Yii 2 development](https://github.com/yiisoft/yii2/blob/master/docs/internals/getting-started.md)". |
||||
|
Loading…
Reference in new issue