Skip to content

Commit e5d0312

Browse files
Remove PhantomJS from ParallelExecution and framework pages
* Update 12-ParallelExecution.md Removing PhantomJS, see Codeception/module-webdriver#28 (comment) * Update symfony.md * Update laravel.md * Update yii.md * Update 07-AdvancedUsage.md
1 parent 9c523ba commit e5d0312

5 files changed

Lines changed: 16 additions & 24 deletions

File tree

docs/07-AdvancedUsage.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,6 @@ modules:
384384
url: 'http://127.0.0.1:8000/'
385385
browser: 'firefox'
386386

387-
env:
388-
phantom:
389-
modules:
390-
config:
391-
WebDriver:
392-
browser: 'phantomjs'
393-
394387
chrome:
395388
modules:
396389
config:
@@ -402,7 +395,7 @@ env:
402395

403396
{% endhighlight %}
404397

405-
Basically you can define different environments inside the `env` root, name them (`phantom`, `chrome` etc.),
398+
Basically you can define different environments inside the `env` root, name them (`chrome`, `firefox` etc.),
406399
and then redefine any configuration parameters that were set before.
407400

408401
You can also define environments in separate configuration files placed in the directory specified by the `envs` option in
@@ -439,19 +432,19 @@ modules:
439432
The environment configuration files are merged into the main configuration before the suite configuration is merged.
440433

441434
You can easily switch between those configs by running tests with `--env` option.
442-
To run the tests only for PhantomJS you just need to pass `--env phantom` as an option:
435+
To run the tests only for Firefox you just need to pass `--env firefox` as an option:
443436

444437
{% highlight bash %}
445438

446-
$ php vendor/bin/codecept run acceptance --env phantom
439+
$ php vendor/bin/codecept run acceptance --env firefox
447440

448441
{% endhighlight %}
449442

450-
To run the tests in all 3 browsers, list all the environments:
443+
To run the tests in all browsers, list all the environments:
451444

452445
{% highlight bash %}
453446

454-
$ php vendor/bin/codecept run acceptance --env phantom --env chrome --env firefox
447+
$ php vendor/bin/codecept run acceptance --env chrome --env firefox
455448

456449
{% endhighlight %}
457450

@@ -461,7 +454,7 @@ It's also possible to merge multiple environments into a single configuration by
461454

462455
{% highlight bash %}
463456

464-
$ php vendor/bin/codecept run acceptance --env dev,phantom --env dev,chrome --env dev,firefox
457+
$ php vendor/bin/codecept run acceptance --env dev,firefox --env dev,chrome --env dev,firefox
465458

466459
{% endhighlight %}
467460

@@ -479,10 +472,10 @@ The desired environments can be specified with the `@env` annotation for tests i
479472
class UserCest
480473
{
481474
/**
482-
* This test will be executed only in 'firefox' and 'phantom' environments
475+
* This test will be executed only in 'firefox' and 'chrome' environments
483476
*
484477
* @env firefox
485-
* @env phantom
478+
* @env chrome
486479
*/
487480
public function webkitOnlyTest(AcceptanceTester $I)
488481
{
@@ -498,7 +491,7 @@ For Cept you should use simple comments:
498491
499492
<?php
500493
// @env firefox
501-
// @env phantom
494+
// @env chrome
502495
503496
{% endhighlight %}
504497
@@ -540,9 +533,8 @@ while in Cest you should retrieve it through dependency injection:
540533
<?php
541534
public function myTest(\AcceptanceTester $I, \Codeception\Scenario $scenario)
542535
{
543-
if ($scenario->current('browser') == 'phantomjs') {
544-
// emulate popups for PhantomJS
545-
$I->executeScript('window.alert = function(){return true;}');
536+
if ($scenario->current('browser') == 'chrome') {
537+
// ...
546538
}
547539
}
548540

docs/12-ParallelExecution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: 12-ParallelExecution - Codeception - Documentation
55

66
# Parallel Execution
77

8-
When execution time of your tests is longer than a coffee break, it is a good reason to think about making your tests faster. If you have already tried to run them on SSD drive, or to use PhantomJS instead of Selenium, and the execution time still upsets you, it might be a good idea to run your tests in parallel.
8+
When execution time of your tests is longer than a coffee break, it is a good reason to think about making your tests faster. If you have already tried to run them on SSD drive, and the execution time still upsets you, it might be a good idea to run your tests in parallel.
99

1010
## Where to start
1111

@@ -472,4 +472,4 @@ Codeception does not provide tools for parallel test execution. This is a comple
472472

473473

474474

475-
* **Previous Chapter: [< ContinuousIntegration](/docs/12-ContinuousIntegration)**
475+
* **Previous Chapter: [< ContinuousIntegration](/docs/12-ContinuousIntegration)**

for/laravel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ modules:
101101
- \Helper\Acceptance
102102
```
103103

104-
Browser can be specified as `firefox`, `chrome`, `phantomjs`, or others.
104+
Browser can be specified as `firefox`, `chrome`, or others.
105105

106106
Acceptance tests will be executed in development environment using real web server, so settings from `.env.testing` can't be passed to them.
107107

for/symfony.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ modules:
4747
- \Helper\Acceptance
4848
```
4949
50-
Browser can be specified as `chrome`, `firefox`, `phantomjs`, or others.
50+
Browser can be specified as `chrome`, `firefox`, or others.
5151

5252
To create a sample test called, run:
5353

for/yii.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Then you will need to launch application server in test mode:
166166
./tests/bin/yii serve
167167
```
168168

169-
and start a [Selenium Server or PhantomJS](http://codeception.com/docs/modules/WebDriver#Local-Testing). For acceptance WebDriver module is used. Please check its reference to learn how to work with it. Unlike Yii2 module it does know nothing about your application, so if you want to use features of Yii like fixtures for acceptance testing, you should check that enable Yii2 module is enabled as well:
169+
and start a [Selenium Server](http://codeception.com/docs/modules/WebDriver#Local-Testing). For acceptance WebDriver module is used. Please check its reference to learn how to work with it. Unlike Yii2 module it does know nothing about your application, so if you want to use features of Yii like fixtures for acceptance testing, you should check that enable Yii2 module is enabled as well:
170170

171171
```yml
172172
# config at tests/acceptance.yml

0 commit comments

Comments
 (0)