Skip to content

Commit 871c819

Browse files
committed
Merge branch 'master' of github.com:Codeception/codeception.github.com
2 parents 823b2df + 480bb1a commit 871c819

File tree

4 files changed

+59
-12
lines changed

4 files changed

+59
-12
lines changed

changelog.markdown

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ title: Codeception Changelog
77

88
# Changelog
99

10+
#### 2.2.8
11+
12+
* **[Laravel5]** Added `seeNumRecords` and `grabNumRecords` methods. See [#3816](https://github.com/Codeception/Codeception/issues/3816). By **[dmoreno](https://github.com/dmoreno)**
13+
1014
#### 2.2.7
1115

1216
* **Config validation** with `codecept config:validate` command. Use it:
@@ -20,17 +24,18 @@ This should help you next time you get messed with YAML formatting.
2024

2125
* Gherkin improvements:
2226
* multiple step definitions per method allowed (Fixes [#3670](https://github.com/Codeception/Codeception/issues/3670)).
23-
* regex validation for Gherkin steps; throws exception if invalid regex passed. Fixes [#3676](https://github.com/Codeception/Codeception/issues/3676)
24-
* escaped strings can now be passed into placeholders. Fixes [#3676](https://github.com/Codeception/Codeception/issues/3676).
27+
* regex validation for Gherkin steps; throws exception if invalid regex passed. Fixes [#3676](https://github.com/Codeception/Codeception/issues/3676)
2528
* currency chars supported in placeholders:
26-
29+
2730
$,€,£ and other signs can be used before or after a number inside Gherkin scenario. This char will be ignored inside a PHP variable, so you receive only number.
2831

2932
```gherkin
3033
When I have 100$ => $num === 100
3134
And I have $100 => $num === 100
3235
```
3336

37+
* escaped strings can now be passed into placeholders. Fixes [#3676](https://github.com/Codeception/Codeception/issues/3676).
38+
3439
* Codeception is tested with latest verision of HHVM
3540
* Extensions loader refactored:
3641
* Extensions can be **enabled for suite** in suite config.

docs/07-AdvancedUsage.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Data is defined via the `@example` annotation, using JSON or Doctrine-style nota
212212

213213
<div class="alert alert-notice">
214214
If you use JSON notation please keep in mind that all string keys
215-
and values should be enclosed in doble quotes " according to JSON standard.
215+
and values should be enclosed in double quotes " according to JSON standard.
216216
</div>
217217

218218
You can pass key-value data as an example and use it in tests as well:
@@ -254,6 +254,7 @@ These examples can be written using Doctrine-style annotation syntax as well:
254254
{% endhighlight %}
255255

256256
You can also use the `@dataprovider` annotation for creating dynamic examples, using a protected method for providing example data:
257+
257258
{% highlight php %}
258259

259260
<?php
@@ -286,6 +287,7 @@ Alternatively, the `@dataprovider` can also be a public method starting with `_`
286287

287288
{% highlight php %}
288289

290+
<?php
289291
/**
290292
* @dataprovider _pageProvider
291293
*/
@@ -693,28 +695,36 @@ Feature: Admin area
693695
### Group Files
694696

695697
Groups can be defined in global or suite configuration files.
696-
Tests for groups can be specified as an array or as a path to a file containing a list of groups:
698+
Tests for groups can be specified as an array of file names or directories containing them:
697699

698700
{% highlight yaml %}
699701

700702
groups:
701703
# add 2 tests to db group
702704
db: [tests/unit/PersistTest.php, tests/unit/DataTest.php]
703-
704-
# add list of tests to slow group
705-
slow: tests/_data/slow
705+
706+
# add all tests from a directory to api group
707+
api: [tests/functional/api]
706708

707709
{% endhighlight %}
708710

709-
For instance, you can create a file with the list of the slowest tests, and run them inside their own group.
710-
Group file is a plain text file with test names on separate lines:
711+
A list of tests for the group can be passed from a Group file. It should be defined in plain text with test names on separate lines:
711712

712713
{% highlight bash %}
713714

714715
tests/unit/DbTest.php
715716
tests/unit/UserTest.php:create
716717
tests/unit/UserTest.php:update
717718

719+
{% endhighlight %}
720+
A group file can be included by its relative filename:
721+
722+
{% highlight yaml %}
723+
724+
groups:
725+
# requiring a group file
726+
slow: tests/_data/slow.txt
727+
718728
{% endhighlight %}
719729

720730
You can create group files manually or generate them from third party applications.
@@ -729,7 +739,8 @@ groups:
729739

730740
{% endhighlight %}
731741

732-
This will load all found `p*` files in `tests/_data` as groups.
742+
This will load all found `p*` files in `tests/_data` as groups. Group names will be as follows p1,p2,...,pN.
743+
733744

734745
## Conclusion
735746

docs/12-ContinuousIntegration.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,43 @@ Travis doesn't provide visualization for XML or HTML reports so you can't view r
132132

133133
## GitLab
134134

135-
[Work In Progress]
135+
If a file {% highlight yaml %}
136+
.gitlab-ci.yml
137+
{% endhighlight %} exists in the root of the git repository, gitlab will run a pipeline each time you push to the gitlab server. The file configures the docker image that will be called. Below is a sample which loads a php7 docker image, clones your files, installs composer dependencies, runs the built-in php webserver and finally runs codeception:
138+
139+
{% highlight yaml %}
140+
141+
# Select image from https://hub.docker.com/_/php/
142+
image: php:7.0
143+
144+
# Select what we should cache
145+
cache:
146+
paths:
147+
- vendor/
148+
149+
before_script:
150+
# Install git and unzip (composer will need them)
151+
- apt-get update && apt-get install -qqy git unzip
152+
# Install composer
153+
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
154+
# Install all project dependencies
155+
- composer install
156+
# Run webserver
157+
- php -S localhost:8085 --docroot public &>/dev/null&
158+
159+
# Test
160+
test:
161+
script:
162+
- vendor/bin/codecept run
163+
164+
{% endhighlight %}
136165

137166
## Conclusion
138167

139168
It is tringly recommended to use Continuous Integration system in development. Codeception is easy to install and run in any CI systems. However, each of them has their differences you should take into account. You can use different repoters to provide output in format expected by CI system.
140169

141170

142171

172+
143173
* **Next Chapter: [ParallelExecution >](/docs/12-ParallelExecution)**
144174
* **Previous Chapter: [< Codecoverage](/docs/11-Codecoverage)**

docs/modules/WebDriver.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ you should use a tunnel application provided by a service.
133133
* `capabilities` - Sets Selenium2 [desired capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities). Should be a key-value array.
134134
* `connection_timeout` - timeout for opening a connection to remote selenium server (30 seconds by default).
135135
* `request_timeout` - timeout for a request to return something from remote selenium server (30 seconds by default).
136+
* `pageload_timeout` - amount of time to wait for a page load to complete before throwing an error (default 0 seconds).
136137
* `http_proxy` - sets http proxy server url for testing a remote server.
137138
* `http_proxy_port` - sets http proxy server port
138139
* `debug_log_entries` - how many selenium entries to print with `debugWebDriverLogs` or on fail (15 by default).

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy