{"id":22305016,"url":"https://github.com/rainman-77/cloudecomautomation","last_synced_at":"2026-04-11T13:02:02.449Z","repository":{"id":265975177,"uuid":"867525782","full_name":"rainman-77/CloudEcomAutomation","owner":"rainman-77","description":"A hybrid test automation framework using Python, Selenium, Pytest, and Jenkins with Dockerized Selenium Grid on AWS EC2 for scalable cloud testing.","archived":false,"fork":false,"pushed_at":"2024-12-01T21:15:18.000Z","size":1517,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T00:44:39.347Z","etag":null,"topics":["allure-reports","automation-testing","aws","docker","ecommerce-application","hybrid-framework","jenkins","pytest","python","qa-testing","selenium","selenium-grid"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rainman-77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-04T08:26:47.000Z","updated_at":"2025-01-03T09:54:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"31b2f964-1111-4181-b0e0-b91c24ed3184","html_url":"https://github.com/rainman-77/CloudEcomAutomation","commit_stats":null,"previous_names":["rainman-77/cloudecomautomation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rainman-77/CloudEcomAutomation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainman-77%2FCloudEcomAutomation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainman-77%2FCloudEcomAutomation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainman-77%2FCloudEcomAutomation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainman-77%2FCloudEcomAutomation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rainman-77","download_url":"https://codeload.github.com/rainman-77/CloudEcomAutomation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainman-77%2FCloudEcomAutomation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266042003,"owners_count":23867960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allure-reports","automation-testing","aws","docker","ecommerce-application","hybrid-framework","jenkins","pytest","python","qa-testing","selenium","selenium-grid"],"created_at":"2024-12-03T19:09:23.282Z","updated_at":"2025-12-30T22:07:05.258Z","avatar_url":"https://github.com/rainman-77.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudEcomAutomation\n\n### A Hybrid Automation Framework for Testing an E-commerce Application Using Selenium, Pytest, Allure, Docker, Jenkins, and AWS.\n\n---\n\n## Table of Contents\n1. [Project Overview](#project-overview)\n2. [Features](#features)\n3. [Technologies Used](#technologies-used)\n4. [Project Setup](#project-setup)\n5. [Running Tests Locally](#running-tests-locally)\n6. [Running Tests with Cloud Integration](#running-tests-with-cloud-integration)\n7. [Sample Reports](#sample-reports)\n8. [Folder Structure](#folder-structure)\n9. [Future Enhancements](#future-enhancements)\n10. [Contributors](#contributors)\n11. [Credits](#credits)\n12. [License](#license)\n\n---\n\n## Project Overview\n\nThis project automates functional testing for a demo e-commerce web application https://tutorialsninja.com/demo. It is built on a robust hybrid automation framework using:\n- **Page Object Model (POM)**: For maintainable and reusable code.\n- **Selenium**: For web browser automation.\n- **Pytest**: For scalable and flexible test execution.\n- **Allure Reports**: For visually appealing test results.\n- **Selenium Grid (Docker)**: For parallel and cross-browser testing.\n- **Jenkins**: For CI/CD pipelines and scheduled test executions.\n- **AWS EC2**: For running the automation framework on the cloud.\n\n---\n\n## Features\n\n- **Functional Coverage**:\n  - User login tests\n  - Registration tests\n  - Product search tests\n  - Add to cart functionality\n  - Cart and checkout page validations\n- **Parallel Test Execution** with `pytest-xdist`.\n- **Allure Integration** for detailed reporting.\n- **Dockerized Selenium Grid** for distributed testing.\n- **AWS EC2 Integration**:\n  - Jenkins, Docker, and Selenium Grid deployed on AWS EC2 instance for cloud-based automation. \n\n---\n\n## Technologies Used\n\n- **Programming Language**: Python\n- **Frameworks**: Pytest, Selenium, POM\n- **Reporting**: Allure Reports\n- **CI/CD**: Jenkins\n- **Cloud Infrastructure**: AWS EC2\n- **Containerization**: Docker and Docker Compose\n\n---\n\n## Project Setup\n\n### 1. Prerequisites\n\n- #### For Local System\n  - **Python 3.9+** installed.\n  - **Node.js Installed**\n    - Allure CLI requires Node.js. Install it from the official [Node.js website](https://nodejs.org/).\n    - Run the following command to install Allure CLI:\n      ```bash\n      npm install -g allure-commandline\n      ```\n    - Verify installation by running:\n      ```bash\n      allure --version\n      ```\n  - **Allure Command-line Tool**\n    - Add Allure CLI to your system path if necessary.\n  - **Python Dependencies**\n    - Install the required Python libraries using `pip`:\n      ```bash\n      pip install -r requirements.txt\n      ```\n\n- #### For AWS EC2 Instance\n    - Use an **AWS Linux 2023 AMI** (t3.medium instance type with 4GB memory is recommended).\n    - Configure the AWS security group with inbound rules for HTTP (80), Selenium Grid (4444), Jenkins (8080), and SSH (22) to allow necessary access for the project\n    - Access the instance via SSH using your private key:\n      ```bash\n      ssh -i \"your-key.pem\" ec2-user@\u003cinstance-public-ip\u003e\n      ```\n\n  - **Java 21 Installed**\n    - Install Java (Amazon Corretto 21) required for Jenkins and Allure CLI:\n      ```bash\n      sudo yum update -y\n      sudo yum install java-21-amazon-corretto-devel -y\n      ```\n\n  - **Jenkins Installed**\n    - Download the Jenkins WAR file and run Jenkins:\n      ```bash\n      wget https://updates.jenkins.io/download/war/2.479.1/jenkins.war\n      java -jar jenkins.war\n      ```\n\n  - **Jenkins Plugins**\n    - Install the following plugins in Jenkins:\n    - ShiningPanda Plugin (optional for using python's venv)\n    - Allure Jenkins Plugin\n    - Git Plugin (by default added by jenkins during first time setup)\n    - Pipeline Plugin (by default added by jenkins during first time setup)\n\n  - **Allure CLI Installation**\n    - Download Allure CLI\n    ```bash\n    wget https://github.com/allure-framework/allure2/releases/download/2.23.0/allure-2.23.0.tgz\n    ```\n    - Extract and Install Allure CLI\n    ```bash\n    tar -xvzf allure-2.23.0.tgz\n    sudo mv allure-2.23.0 /opt/allure\n    sudo ln -s /opt/allure/bin/allure /usr/bin/allure\n    allure --version\n    ```\n  - **In Jenkins Global tool configurations**\n    - Add Java configuration:\n      - Name: `Java 21` (any name)\n      - Provide installation path (e.g., `/usr/lib/jvm/java-21-amazon-corretto`)\n      - Do not select \"Install automatically\" since Java is already installed\n    - Configure Allure CLI\n      - Name: `Allure CLI` (any name)\n      - Provide installation path (e.g., `/opt/allure`)\n  \n\n  ### 2. Clone the Repository\n  ```bash\n  git clone https://github.com/rainman-77/CloudEcomAutomation.git\n  cd CloudEcomAutomation\n  ```\n## Run Tests Locally\n  ### 1. Setup in config.ini\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;set execution=parallel \u0026 run_environment=local\n  ### 2. Run the test scripts in parallel mode()\n   ```bash\n   pytest tests/ --alluredir=reports -n 3\n  ```\n  ### 3. Generate Allure Reports\n  ```bash\n   allure generate reports --clean -o allure_report\n   allure open allure_report\n  ```\n\n## Running Tests with Cloud Integration\n  ### 1. Dockerized Selenium Grid\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;The docker-compose.yml file sets up a Selenium Hub and 3 browser nodes (Chrome, Firefox, Edge) for parallel testing.\n  ### 2. Jenkins CI/CD\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;'Jenkinsfile' is configured for installing python,pip,docker \u0026 all other dependencies using requirements.txt file, then runs python scrips, generate allure reports\n### 3. Creating New Jenkins Pipeline Job\n- Navigate to the Jenkins dashboard and create a new pipeline job.\n- Configure the pipeline to use your GitHub repository \u0026 also link the Jenkinsfile\n- Set up build triggers like GitHub webhook or schedule (optional)\n- Run the build \u0026 pipeline will handle the execution of test scripts, Docker, and report generation.\n\n## Sample Reports from the Test Runs on AWS instance\n### 1. Jenkins Pipeline Dashboard\n\u003cimg src=\"sample_reports_screenshots/1.png\" alt=\"Jenkins Pipeline Dashboard\" width=\"700\" height=\"350\"\u003e\n\n### 2. Allure Test Summary\n\u003cimg src=\"sample_reports_screenshots/2.png\" alt=\"Allure Test Summary\" width=\"700\" height=\"350\"\u003e\n\n### 3. Allure Test Details\n\u003cimg src=\"sample_reports_screenshots/3.png\" alt=\"Allure Test Details\" width=\"700\" height=\"350\"\u003e\n\n## Folder Structure\n\n```plaintext\nCloudEcomAutomation/\n├── allure_report/          # Allure HTML reports\n├── logs/                   # Logs generated during test execution\n├── pageobjects/            # Page Object Model classes for different pages\n├── reports/                # Allure JSON reports (used to generate HTML reports)\n├── testdata/               # Test data files\n├── tests/                  # Pytest scripts for various functionalities\n├── utilities/              # Utility functions and helpers\n├── docker-compose.yml      # Docker configuration for Selenium Grid\n├── Jenkinsfile             # Jenkins pipeline configuration\n├── pytest.ini              # Pytest configuration file\n├── requirements.txt        # Python dependencies\n└── README.md               # Project documentation\n```\n\n## Future Enhancements\n\n- Add more test cases for payment gateway integration.\n- Implement API testing for backend functionalities.\n\n## Contributors\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**Ashithosh K S** (Owner and Contributor)\n\n## Credits\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;The `docker-compose.yml` file is adapted from [Selenium's official GitHub repository](https://github.com/SeleniumHQ/docker-selenium).\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE). Feel free to use, modify, and distribute the code with attribution.\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainman-77%2Fcloudecomautomation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frainman-77%2Fcloudecomautomation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainman-77%2Fcloudecomautomation/lists"}