Skip to content

hackley2/selenium-php-apache-mysql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

selenium-php-apache-mysql

Docker image containing everything needed to run BDD and TDD tests using Selenium, PHP, Apache, MySQL, and Redis on a CI server such as Bitbucket Pipelines.

Supported Tags:

latest, php5.6

How to Use:

All services are stopped by default, so you'll need to start and configure the services as needed. Here are the basics:

Apache

Enable rewrite module:

a2enmod rewrite

Start Apache:

apache2ctl start

Tip: Apache will need to be further configured as needed. If you're not sure where to start, setting up a /etc/apache2/sites-available/vhosts.conf file would be a good first step.

MySQL

Start MySQL:

/etc/init.d/mysql start

Tip: By default, MySQL server allows localhost root connections without specifying a password.

Redis

Start Redis:

nohup redis-server &

Selenium

Start Selenium:

export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH"
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" nohup java -jar /opt/selenium/selenium-server-standalone.jar &

Example Behat Configuration YAML File (adapt to your needs as necessary... this example is based off of a Laravel framework + Mink w/ Goutte driver environment):

default:
    extensions:
        Laracasts\Behat\ServiceContainer\BehatExtension: ~

        Behat\MinkExtension:
            laravel: ~
            goutte: ~
            selenium2:
                wd_host: 127.0.0.1:4444/wd/hub
                capabilities:
                    browser: chrome
                    version: ANY
            default_session: goutte
            javascript_session: selenium2
            browser_name: chrome
            base_url: http://your-local-app-url.com # assumes proper setup of your apache /etc/apache2/sites-available/vhosts.conf and /etc/hosts file

About

Docker Image that includes selenium, php, apache, and mysql

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%