diff --git a/Docker_README.md b/Docker_README.md deleted file mode 100755 index 2ed9e1e88f8..00000000000 --- a/Docker_README.md +++ /dev/null @@ -1,63 +0,0 @@ -## Docker setup instructions for SeleniumBase - -#### 1. Get the Docker Toolbox from https://www.docker.com/docker-toolbox and install it. - -#### 2. Create your SeleniumBase Docker environment: - - docker-machine create --driver virtualbox seleniumbase - -##### (If your Docker environment ever goes down for any reason, you can bring it back up with a restart.) - - docker-machine restart seleniumbase - -#### 3. Configure your shell: - - eval "$(docker-machine env seleniumbase)" - -#### 4. Go to the SeleniumBase home directory. (That's where "Dockerfile" is located) - -#### 5. Create your Docker image from your Dockerfile: (Get ready to wait awhile) - - docker build -t seleniumbase . - -#### 6. Run a test inside your Docker: (Once the test completes after a few seconds, you'll automatically exit the Docker shell) - - docker run seleniumbase ./run_docker_test_in_firefox.sh - -#### 7. Now run the same test with Chrome inside your Docker: - - docker run seleniumbase ./run_docker_test_in_chrome.sh - -#### 8. You can also enter Docker and stay inside the shell: - - docker run -i -t seleniumbase - -#### 9. Now you can run the example test from inside the Docker shell: - - ./run_docker_test_in_chrome.sh - -#### 10. When you're satisfied, you may exit the Docker shell: - - exit - -#### 11. (Optional) Since Docker images and containers take up a lot of space, you may want to clean up your machine from time to time when they’re not being used: -http://stackoverflow.com/questions/17236796/how-to-remove-old-docker-containers -Here are a few of those cleanup commands: - - docker images | grep "" | awk '{print $3}' | xargs docker rmi - docker rm 'docker ps --no-trunc -aq' - -If you want to completely remove all of your Docker containers and images, use these commands: (If there's nothing to delete, those commands will return an error.) - - docker rm $(docker ps -a -q) - docker rmi $(docker images -q) - -Finally, if you want to wipe out your SeleniumBase Docker virtualbox, use these commands: - - docker-machine kill seleniumbase - docker-machine rm seleniumbase - -#### 12. (Optional) More reading on Docker can be found here: -* https://docs.docker.com -* https://docs.docker.com/mac/started/ -* https://docs.docker.com/installation/mac/ diff --git a/Dockerfile b/Dockerfile index f1fd953eacf..293e04d666e 100755 --- a/Dockerfile +++ b/Dockerfile @@ -94,8 +94,8 @@ RUN exec "$@" #===================== # Set up SeleniumBase #===================== -COPY docker/docker_requirements.txt /SeleniumBase/ -COPY docker/docker_setup.py /SeleniumBase/ +COPY integrations/docker/docker_requirements.txt /SeleniumBase/ +COPY integrations/docker/docker_setup.py /SeleniumBase/ COPY seleniumbase /SeleniumBase/seleniumbase/ COPY examples /SeleniumBase/examples/ RUN cd /SeleniumBase && ls && sudo pip install -r docker_requirements.txt @@ -104,9 +104,9 @@ RUN cd /SeleniumBase && ls && sudo python docker_setup.py install #========================================== # Create entrypoint and grab example tests #========================================== -COPY docker/docker-entrypoint.sh / -COPY docker/run_docker_test_in_firefox.sh / -COPY docker/run_docker_test_in_chrome.sh / -COPY docker/docker_config.cfg /SeleniumBase/examples/ +COPY integrations/docker/docker-entrypoint.sh / +COPY integrations/docker/run_docker_test_in_firefox.sh / +COPY integrations/docker/run_docker_test_in_chrome.sh / +COPY integrations/docker/docker_config.cfg /SeleniumBase/examples/ ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["/bin/bash"] diff --git a/README.md b/README.md index bd1924d226a..4e4f4bb786e 100755 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ### Part I: MAC SETUP INSTRUCTIONS ####(WINDOWS users: You'll need to make a few modifications to the setup steps listed here. For starters, you won't be able to use the "brew install" command since that's MAC-only. Instead, download the requirements mentioned directly from the web. I'll provide you with links to save you time. You'll also want to put downloaded files into your [PATH](http://java.com/en/download/help/path.xml).) -####(DOCKER users: If you want to run browser automation with Docker, see the [Docker_README](https://github.com/mdmintz/SeleniumBase/blob/master/Docker_README.md)) +####(DOCKER users: If you want to run browser automation with Docker, see the [Docker ReadMe](https://github.com/mdmintz/SeleniumBase/blob/master/integrations/docker/ReadMe.md)) #### **Step 0:** Get the requirements @@ -263,7 +263,7 @@ If you're planning on using the full power of this test framework, there are a f * Install [MySQL Workbench](http://dev.mysql.com/downloads/tools/workbench/) to make life easier by giving you a nice GUI tool that you can use to read & write from your DB directly. -* Setup your Selenium Grid and update your *.cfg file to point there. An example config file called selenium_server_config_example.cfg has been provided for you in the grid folder. The start-selenium-node.bat and start-selenium-server.sh files are for running your grid. In an example situation, your Selenium Grid server might live on a unix box and your Selenium Grid nodes might live on EC2 Windows virtual machines. When your build server runs a Selenium test, it would connect to your Selenium Grid to find out which Grid browser nodes are available to run that test. To simplify things, you can use [Browser Stack](https://www.browserstack.com/automate) as your entire Selenium Grid (and let them do all the fun work of maintaining the grid for you). +* Setup your Selenium Grid and update your *.cfg file to point there. An example config file called selenium_server_config_example.cfg has been provided for you in the integrations/selenium_grid folder. The start-selenium-node.bat and start-selenium-server.sh files are for running your grid. In an example situation, your Selenium Grid server might live on a unix box and your Selenium Grid nodes might live on EC2 Windows virtual machines. When your build server runs a Selenium test, it would connect to your Selenium Grid to find out which Grid browser nodes are available to run that test. To simplify things, you can use [Browser Stack](https://www.browserstack.com/automate) as your entire Selenium Grid (and let them do all the fun work of maintaining the grid for you). * There are ways of running your tests from Jenkins without having to utilize a remote machine. One way is by using PhantomJS as your browser (it runs headlessly). Another way is by using Xvfb (another headless system). [There's a plugin for Xvfb in Jenkins](https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin). If you have Xvfb running in the background, you can add ``--headless`` to your run command in order to utilize it. diff --git a/docker/ReadMe.md b/integrations/docker/ReadMe.md similarity index 100% rename from docker/ReadMe.md rename to integrations/docker/ReadMe.md diff --git a/docker/docker-entrypoint.sh b/integrations/docker/docker-entrypoint.sh similarity index 100% rename from docker/docker-entrypoint.sh rename to integrations/docker/docker-entrypoint.sh diff --git a/docker/docker_config.cfg b/integrations/docker/docker_config.cfg similarity index 100% rename from docker/docker_config.cfg rename to integrations/docker/docker_config.cfg diff --git a/docker/docker_requirements.txt b/integrations/docker/docker_requirements.txt similarity index 100% rename from docker/docker_requirements.txt rename to integrations/docker/docker_requirements.txt diff --git a/docker/docker_setup.py b/integrations/docker/docker_setup.py similarity index 100% rename from docker/docker_setup.py rename to integrations/docker/docker_setup.py diff --git a/docker/run_docker_test_in_chrome.sh b/integrations/docker/run_docker_test_in_chrome.sh similarity index 100% rename from docker/run_docker_test_in_chrome.sh rename to integrations/docker/run_docker_test_in_chrome.sh diff --git a/docker/run_docker_test_in_firefox.sh b/integrations/docker/run_docker_test_in_firefox.sh similarity index 100% rename from docker/run_docker_test_in_firefox.sh rename to integrations/docker/run_docker_test_in_firefox.sh diff --git a/integrations/google_cloud/ReadMe.md b/integrations/google_cloud/ReadMe.md index 00ba85031df..026a586336d 100755 --- a/integrations/google_cloud/ReadMe.md +++ b/integrations/google_cloud/ReadMe.md @@ -24,10 +24,10 @@ cd / sudo git clone https://github.com/mdmintz/SeleniumBase.git ``` -#### 5. Enter the "google_cloud" folder +#### 5. Enter the "linux" folder ```bash -cd SeleniumBase/integrations/google_cloud/ +cd SeleniumBase/integrations/linux/ ``` #### 6. Give Jenkins (aka "tomcat" user) sudo access diff --git a/integrations/google_cloud/Linuxfile.sh b/integrations/linux/Linuxfile.sh similarity index 100% rename from integrations/google_cloud/Linuxfile.sh rename to integrations/linux/Linuxfile.sh diff --git a/integrations/google_cloud/Xvfb_launcher.sh b/integrations/linux/Xvfb_launcher.sh similarity index 100% rename from integrations/google_cloud/Xvfb_launcher.sh rename to integrations/linux/Xvfb_launcher.sh diff --git a/integrations/google_cloud/jenkins_permissions.sh b/integrations/linux/jenkins_permissions.sh similarity index 100% rename from integrations/google_cloud/jenkins_permissions.sh rename to integrations/linux/jenkins_permissions.sh diff --git a/grid_files/ReadMe.md b/integrations/selenium_grid/ReadMe.md similarity index 100% rename from grid_files/ReadMe.md rename to integrations/selenium_grid/ReadMe.md diff --git a/grid_files/selenium_server_config_example.cfg b/integrations/selenium_grid/selenium_server_config_example.cfg similarity index 100% rename from grid_files/selenium_server_config_example.cfg rename to integrations/selenium_grid/selenium_server_config_example.cfg diff --git a/grid_files/start-selenium-node.bat b/integrations/selenium_grid/start-selenium-node.bat similarity index 100% rename from grid_files/start-selenium-node.bat rename to integrations/selenium_grid/start-selenium-node.bat diff --git a/grid_files/start-selenium-server.sh b/integrations/selenium_grid/start-selenium-server.sh similarity index 100% rename from grid_files/start-selenium-server.sh rename to integrations/selenium_grid/start-selenium-server.sh