Skip to content

Commit 3bfa108

Browse files
ivy00johnsjilu1
authored andcommitted
Updating the README file:
- Adding a reference to the new Robo command to clone all of the necessary .dist. files. - Moved the step for "composer install" to the top of the page so they can use the Robo command I added to clone the files. - Adding a list of the current Test Groups that we have listed in the Test Suite. These names are still a work in progress. (cherry picked from commit 268920d)
1 parent 335a9cd commit 3bfa108

File tree

1 file changed

+54
-18
lines changed

1 file changed

+54
-18
lines changed

Diff for: README.md

+54-18
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
# Welcome to the example of Codeception + Robo + Allure!
2+
23
### Prerequisites
34
* **Codeception**, **Allure** and **Robo** are PHP based applications installed via **Composer**, so you will need to have **Composer** installed in order to run the following. Please visit the [Composer](https://getcomposer.org/) homepage for installation instructions.
45
* Some settings need to be adjusted to meet the build environment settings in the appropriate `XXX.suite.yml` file in the `[PROJECT_ROOT]/tests/` directory: `[PROJECT_ROOT]/tests/XXXXXXX.suite.yml`
5-
### Configuration
6-
* Create .env file by copying existing .env.example file at project root directory.
76

7+
### Installation
8+
* Open a Terminal Window. CD to the Project Directory. Run the following command to install the project dependencies:
9+
```
10+
cd [LOCATION_OF_GITHUB_REPO]
11+
composer install
12+
```
13+
14+
### Configuration
15+
* In order to adjust the settings for the Framework you will need to copy the `.dist.` settings files and make your adjustments based on your unique Setup. These files are listed in the `.gitignore` file so they will only effect your Setup. You can run the following Robo command to copy the necassary files or follow the [Optional] instructions listed below.
816
```
9-
cp .env.example .env
17+
robo clone:files
1018
```
11-
* Configure the following environment variables according to Magento application being tested.
19+
20+
* Configure the following `.env` variables according to the Magento application being tested.
1221
```
1322
MAGENTO_BASE_URL=http://magento.loc/index.php
1423
@@ -20,24 +29,29 @@
2029
DB_USERNAME=''
2130
DB_PASSWORD=''
2231
```
23-
* **[Optional]** If you wish to customize entire test suite locally, you can create codeception.yml by copying existing codeception.dist.yml, and make change in codeception.yml.
24-
```
25-
cp codeception.dist.yml codeception.yml
26-
```
27-
* **[Optional]** If you wish to customize acceptance test suite locally, you can create acceptance.suite.yml by copying existing acceptance.suite.dist.yml, and make change in acceptance.suite.yml.
28-
```
29-
cp acceptance.suite.dist.yml acceptance.suite.yml
30-
```
32+
33+
* **[Optional]** Create .env file by copying existing .env.example file at project root directory.
34+
35+
```
36+
cp .env.example .env
37+
```
38+
39+
* **[Optional]** If you wish to customize entire test suite locally, you can create codeception.yml by copying existing codeception.dist.yml, and make change in codeception.yml.
40+
```
41+
cp codeception.dist.yml codeception.yml
42+
```
43+
44+
* **[Optional]** If you wish to customize acceptance test suite locally, you can create acceptance.suite.yml by copying existing acceptance.suite.dist.yml, and make change in acceptance.suite.yml.
45+
```
46+
cp acceptance.suite.dist.yml acceptance.suite.yml
47+
```
48+
3149
### Running the Tests
32-
* Open a Terminal Window. CD to the Project Directory. Run the following command to install the project dependencies:
33-
```
34-
cd [LOCATION_OF_GITHUB_REPO]
35-
composer install
36-
```
3750
* Build the project:
3851
```
3952
vendor/bin/codecept build
4053
```
54+
4155
* **You will need to install Allure's CLI tool to generate the reports, please visit this page for instructions**: http://wiki.qatools.ru/display/AL/Allure+Commandline.
4256
4357
* Next you will need to start a Selenium server so we can run the tests (This will vary based on your local setup).
@@ -49,11 +63,13 @@
4963
```
5064
robo test
5165
```
66+
5267
* To kick off some example tests with 2 test cases run the following command:
5368
5469
```
5570
robo example
5671
```
72+
5773
### Testing using Robo
5874
5975
* You can run the following test suites using robo:
@@ -69,7 +85,6 @@
6985
* Generate a report and open it: `robo allure:report`
7086
7187
### Testing Environments
72-
7388
* You can run a subset of Tests by editing a command in the file `RoboFile.php` or by running `codecept` directly:
7489
7590
```codecept run --env chrome```
@@ -79,13 +94,34 @@
7994
```codecept run --env phantomjs```
8095
8196
```codecept run --env chrome --group slow```
97+
98+
### Testing Groups
99+
* You can run or exclude subsets of Tests using the `--group` and `--skip-group` codeception flags in the Terminal (IF you add the `@env` tag to a Test you HAVE to include the `--env ZZZZ` flag in your `codecept` command):
100+
* ```codecept run acceptance --env ZZZZ --group XXXX --skip-group YYYY```
101+
* *skip*
102+
* *slow*
103+
* *example*
104+
* *sample*
105+
* *admin-direct-access*
106+
* *nav-menu-access*
107+
* *sampleData*
108+
* *nav-menu*
109+
* *add*
110+
* *fields*
111+
* *catalog*
112+
* *configurable*
113+
* *customer*
114+
* *sales*
115+
* *orders*
116+
82117
### RoboFile.php
83118
84119
* Edit the following command to change the Tests that the command `robo test` executes:
85120
86121
```
87122
$this->_exec('codecept run --env chrome');
88123
```
124+
89125
### TROUBLESHOOTING
90126
* TimeZone Error - http://stackoverflow.com/questions/18768276/codeception-datetime-error
91127
* TimeZone List - http://php.net/manual/en/timezones.america.php

0 commit comments

Comments
 (0)