2017 © Pedro Peláez
 

library headless-testing-for-cakephp

Headless Browser Testing With Selenium For CakePHP3 Apps

image

kentaro-a/headless-testing-for-cakephp

Headless Browser Testing With Selenium For CakePHP3 Apps

  • Tuesday, July 24, 2018
  • by kentaro-a
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

HeadlessTestingForCakePHP

Headless Browser Testing With Selenium For CakePHP3 Apps. This uses Facebook Webdriver and Selenium Standalone Server., (*1)

Installation

$ composer require kentaro-a/headless-testing-for-cakephp

You have to get google-chrome., (*2)

$ curl https://intoli.com/install-google-chrome.sh | bash

Driver you want to use.
ex) If you use ChromeDriver you should get its binary from here.
https://sites.google.com/a/chromium.org/chromedriver/downloads, (*3)

Usage

Launch Selenium Standalone Server as Daemon.

$ vendor/se/selenium-server-standalone/bin/selenium-server-standalone -port 60002 -log "/tmp/selenium.log" > /dev/null 2>&1 &

Testing

Before testing you have to make test code in tests/TestCase/ More about test code, you can see example. Execute cakephp3 test like below., (*4)

$ vendor/bin/phpunit tests/TestCase/HeadlessSampleTest.php --filter test001

Tips

  • Make sure processes
$ ps aux|grep -e selenium -e chrome
  • Kill chrome and selenium If you cannot kill the processes, you should try "kill -9 process" forcibly.
$ pkill -f chrome ; pkill -f selenium
  • If you cannot create driver make sure whether your port is occupied or not by zombie.
$ lsof -i:60002
  • Xpath tip Chrome Addon ChroPath is the easiest way to get a xpath of specific element.

The Versions

24/07 2018

dev-master

9999999-dev

Headless Browser Testing With Selenium For CakePHP3 Apps

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar kentaro-a