[TASK] Install PhantomJS via composer and add codeception integration 64/47564/7
authorSascha Egerer <sascha@sascha-egerer.de>
Mon, 11 Apr 2016 10:40:22 +0000 (12:40 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 12 Apr 2016 19:24:34 +0000 (21:24 +0200)
PhantomJS should be installed via composer to reduce
the system requirements of acceptance tests.

The PhantomJS server should also be started
automatically when running acceptance tests.

Change-Id: I416359484e923e2a04f5213fb7f221bc7d0111e1
Resolves: #75498
Releases: master
Reviewed-on: https://review.typo3.org/47564
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
.travis.yml
composer.json
composer.lock
typo3/sysext/core/Build/AcceptanceTests.yml
typo3/sysext/core/Build/Configuration/Acceptance/acceptance.suite.yml

index a361265..826e9c6 100644 (file)
@@ -68,10 +68,7 @@ script:
     fi
   - >
     if [[ "$ACCEPTANCE_TESTS" == "yes" ]]; then
-        export _JAVA_OPTIONS="-Xms1024m -Xmx1024m";
-        ./bin/selenium-server-standalone >/dev/null 2>&1 &
-        php -S 0.0.0.0:8000 >/dev/null 2>&1 &
-        sleep 5;
+        php -S 0.0.0.0:8000 >/dev/null 2>&1 &;
         export typo3DatabaseName="typo3";
         export typo3DatabaseHost="localhost";
         export typo3DatabaseUsername="root";
index 24f0a99..e54fd4e 100644 (file)
@@ -56,7 +56,9 @@
                "mikey179/vfsStream": "~1.6.0",
                "codeception/codeception": "^2.1",
                "se/selenium-server-standalone": "~2.53",
-               "7elix/styleguide": "~8.0.0"
+               "7elix/styleguide": "~8.0.0",
+               "site5/phantoman": "^1.0",
+               "jakoch/phantomjs-installer": "2.1.1-p01"
        },
        "suggest": {
                "ext-gd": "GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images",
                        "TYPO3\\CMS\\Recycler\\Tests\\": "typo3/sysext/recycler/Tests/"
                },
                "classmap": ["typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/"]
+       },
+       "scripts": {
+               "post-install-cmd": [
+                       "PhantomInstaller\\Installer::installPhantomJS"
+               ],
+               "post-update-cmd": [
+                       "PhantomInstaller\\Installer::installPhantomJS"
+               ]
        }
 }
index 64c24dc..ebeb6aa 100644 (file)
@@ -4,8 +4,8 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "475c61a0b0d33a16dac25dd9a288c75f",
-    "content-hash": "aa3d371cb5c714497024983e989e7062",
+    "hash": "6fdea99c6a254bedacdbebc8544ebef8",
+    "content-hash": "dc90291d1ea42f05065c1b76a4d730c4",
     "packages": [
         {
             "name": "cogpowered/finediff",
             "time": "2015-12-31 15:58:49"
         },
         {
+            "name": "jakoch/phantomjs-installer",
+            "version": "2.1.1-p01",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/jakoch/phantomjs-installer.git",
+                "reference": "00cab61b66c39b60886a2bbdd7674ecfb344f98f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/jakoch/phantomjs-installer/zipball/00cab61b66c39b60886a2bbdd7674ecfb344f98f",
+                "reference": "00cab61b66c39b60886a2bbdd7674ecfb344f98f",
+                "shasum": ""
+            },
+            "require": {
+                "ext-bz2": "*",
+                "ext-openssl": "*"
+            },
+            "type": "custom-installer",
+            "autoload": {
+                "psr-0": {
+                    "PhantomInstaller\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jens-AndrĂ© Koch",
+                    "email": "jakoch@web.de"
+                }
+            ],
+            "description": "A Composer package which installs the PhantomJS binary (Linux, Windows, Mac) into `/bin` of your project.",
+            "keywords": [
+                "binaries",
+                "headless",
+                "phantomjs"
+            ],
+            "time": "2016-04-12 12:15:20"
+        },
+        {
             "name": "mikey179/vfsStream",
             "version": "v1.6.2",
             "source": {
             "time": "2016-02-04 12:56:52"
         },
         {
+            "name": "site5/phantoman",
+            "version": "v1.0.9",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/site5/phantoman.git",
+                "reference": "775aa9c0d692da999b1d20e9bc734d8f210c3077"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/site5/phantoman/zipball/775aa9c0d692da999b1d20e9bc734d8f210c3077",
+                "reference": "775aa9c0d692da999b1d20e9bc734d8f210c3077",
+                "shasum": ""
+            },
+            "require": {
+                "codeception/codeception": "~2.1.0",
+                "php": ">=5.4.0"
+            },
+            "suggest": {
+                "jakoch/phantomjs-installer": "Automatically installs PhantomJS locally to your project."
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Codeception\\Extension\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Grant Lucas",
+                    "email": "grant.lucas@wwwh.com"
+                }
+            ],
+            "description": "The Codeception extension for automatically starting and stopping PhantomJS when running tests.",
+            "homepage": "https://github.com/site5/phantoman",
+            "keywords": [
+                "codeception",
+                "extension",
+                "headless",
+                "phantomjs"
+            ],
+            "time": "2015-11-19 16:40:16"
+        },
+        {
             "name": "symfony/browser-kit",
             "version": "v3.0.4",
             "source": {
index e0e1e98..900449d 100644 (file)
@@ -10,6 +10,11 @@ settings:
   memory_limit: 1024M
 extensions:
   enabled:
+    - Codeception\Extension\Phantoman
     - Codeception\Extension\RunFailed
     - Codeception\Extension\Recorder
     - TYPO3\CMS\Core\Tests\AcceptanceCoreEnvironment
+  config:
+    Codeception\Extension\Phantoman:
+      path: 'bin/phantomjs'
+      port: 4445
index ec28aba..2e1926a 100644 (file)
@@ -8,6 +8,7 @@ modules:
     WebDriver:
       url: http://localhost:8000/typo3temp/var/tests/acceptance
       browser: phantomjs
+      port: 4445
       window_size: 1440x570
       wait: 1
       restart: true
@@ -17,3 +18,4 @@ env:
       config:
         WebDriver:
           browser: firefox
+          port: 4444