Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 2.01 KB

README.md

File metadata and controls

51 lines (32 loc) · 2.01 KB

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