Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samska/gen-ai-robot-test
E2E, API and Visual Tests with Robot Framework, SeleniumLib, RequestsLib, EyesLib and FakerLib
https://github.com/samska/gen-ai-robot-test
eyes-library faker-library requests-library robotframework selenium-library test-automation
Last synced: 22 days ago
JSON representation
E2E, API and Visual Tests with Robot Framework, SeleniumLib, RequestsLib, EyesLib and FakerLib
- Host: GitHub
- URL: https://github.com/samska/gen-ai-robot-test
- Owner: Samska
- Created: 2023-04-11T15:45:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-24T18:22:50.000Z (8 months ago)
- Last Synced: 2024-11-29T23:32:03.110Z (23 days ago)
- Topics: eyes-library, faker-library, requests-library, robotframework, selenium-library, test-automation
- Language: RobotFramework
- Homepage: https://samska.github.io/gen-ai-robot-test/report.html
- Size: 12 MB
- Stars: 14
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Support: support/webdriver/chromedriver.exe
Awesome Lists containing this project
README
[![Robot Framework Tests](https://github.com/Samska/gen-ai-robot-test/actions/workflows/robot.yml/badge.svg)](https://github.com/Samska/gen-ai-robot-test/actions/workflows/robot.yml)
[![Badge ServeRest](https://img.shields.io/badge/API-ServeRest-green)](https://github.com/ServeRest/ServeRest/)# GenerativeAI Robot Framework Tests
This is a Robot Framework project for automated testing using GenerativeAI, that is, part or all of this project's content was made based on AI suggestions, I took the liberty of changing some parts. This project uses the following folder structure:
```
gen-ai-robot-test/
├── .github/
│ ├── workflows/
│ ├── robot.yml # Configuration for the tests on CI
├── config/
│ ├── requirements.txt # Required dependencies for the tests
│ ├── settings.robot # Libraries used in the tests
├── docs/ # Any documentation related to the project
│ ├── chatgpt-interactions/ # Interactions with ChatGPT
│ ├── files.png # Format in which interactions were saved
├── resources/ # Resources used in the project like keywords and variables
│ ├── e2e/ # Test type folder
│ ├── keywords/ # Keywords for that test type
│ ├── test_keywords_common.robot # Keywords that can be reused in more than one e2e test
│ ├── test_keywords_signup.robot # Keywords from a specific page
│ ├── variables/ # Variables for that test type
│ ├── test_variables_common.robot # Variables that can be reused in more than one e2e test
├── results/ # Test results generated by the Robot
│ ├── log.html
│ ├── output.xml
│ ├── report.html
├── support/ # Any additional files needed for the project
│ ├── webdriver/
│ ├── chromedriver.exe # Webdriver file that I used in the project
├── tests/ # Project tests separated by test type folder
│ ├── e2e/ # Test type folder
| ├── test_ui_signup.robot # Test script
│ ├── visual/ # Test type folder
| ├── applitools.yaml # Configuration for Applitools tests
| ├── test_visual_check.robot # Test script
├── .gitignore # Untracked folder and files
├── README.md # README with project overview and instructions
```I also have structured this project following the principles of the Page Object Model. This means that for each page of the web application, or for each API endpoint, I have a corresponding class. This class contains the elements of the page or the details of the endpoint, as well as methods for interacting with these elements or endpoints.
The focus is that by following this pattern, we have code reusability, facilitated maintenance, separation of responsibilities, and better readability.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
- Python 3
- Pip
- ChromeDriver### Installing
1. Clone the repository
2. Install the dependencies:```sh
pip install -r requirements.txt
```### Running the Tests
To run the tests, use the following command:
```sh
robot --outputdir results tests
```This will run all the tests in the tests/ directory and save the report in the results/.
### Test Results
The test results will be generated in the results directory. Open the report.html file to view the HTML report.
You can also consult the test results on this [page](https://samska.github.io/gen-ai-robot-test/report.html) as it is published with each new pipeline run.
### Test Configuration
The test configuration can be found in the config directory. The settings.robot file contains the default configuration, which can be overridden using environment variables or command line arguments.