Skip to content

Docker image with Selenium and Chrome for use in a Python Behavior Driven Development.

License

Notifications You must be signed in to change notification settings

rofrano/pipeline-selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipeline Selenium

Build Status License

This Docker image is for Python Behavior Driven Development with Selenium, Chrome, and Firefox pre-installed.

Description

This Docker image is based on the Python 3.11-Slim Debian 11 and contains Python 3 with Selenium and both the ChromeDriver and GeckoDriver to perform BDD testing with Behave with either headless Chrome or Firefox.

Usage

You can use this Docker image as part of your IBM Cloud Continuous Delivery pipeline as a testing environment for your integration testing or you can use it stand-alone for testing locally.

IBM Cloud Continuous Delivery

Create a Stage with a Test Job and select Custom Docker Image as the Tester type and supply rofrano/pipline-selenium as the Docker image name with the following script:

#!/bin/bash
#Invoke tests here
pip install -qr requirements.txt
echo "**************************************************"
echo "       R U N N I N G   T H E   T E S T S "
echo "**************************************************"
echo "BASE_URL=" $BASE_URL
behave

Your test job should look something like this:

Testing Stage

Local usage

To run locally use:

docker run --rm -it -h nyu --user vscode -v $(pwd):/app -w /app rofrano/pipeline-selenium bash

That will place you inside the container as the user vscode sitting at a bash prompt in the /app folder that has been shared with your current working directory so that you can pip install your dependencies and start your testing.

License

Copyright (c) 2022, 2023 John Rofrano. All rights reserved.

Licensed under the Apache License. See LICENSE

This repo is part of the NYU masters class: CSCI-GA.2820-001 DevOps and Agile Methodologies created by John Rofrano

About

Docker image with Selenium and Chrome for use in a Python Behavior Driven Development.

Resources

License

Stars

Watchers

Forks

Packages

No packages published