-
Make sure that Docker is up and running
-
Build the Docker Image
docker build -t robot-framework-browser .- Run the Container
docker run -e ENVIRONMENT=production -v ${PWD}/results:/usr/src/app/results -v ${PWD}/tests:/usr/src/app/tests -v ${PWD}/resources:/usr/src/app/resources robot-framework-browser- Test report can be find in
/resultsdirectory
- Installed NodeJS v20.15.1 https://nodejs.org/en/download/package-manager
- Installed Python 3.11.5 https://www.python.org/downloads/
Ensure you have the latest version of pip installed:
python.exe -m pip install --upgrade pipCreate a virtual environment to manage your project's dependencies:
python -m venv env- Windows:
.\env\Scripts\activate- macOS/Linux:
source env/bin/activate Install the required dependencies using the provided requirements.txt file:
pip install -r requirements.txtInitialize the Browser environment and run the tests:
- Initialize the Browser Environment:
rfbrowser initBefore running your tests, ensure you have set the ENVIRONMENT variable to either 'production', 'staging', or 'test'. This variable determines which URL will be used in your test scenarios. If no ENVIRONMENT variable is then, then test suite will run 'production'
- Run Tests:
robot --outputdir .\results --pythonpath .\ --loglevel TRACE testsThis project leverages the Robot Framework with the Browser library for automated web testing, specifically focusing on testing a login form. The project includes the following key steps:
-
Create a New Account Using a Random Email Address:
- A random email address is generated using the 1secmail service via API
- For the API calls RESTinstance library is used
-
Fill registration form:
- Random email is used to fill the registration form
- Robot Framework Browser is used for browser automation
-
Send registration form
-
Get a Confirmation Email:
- The system retrieves the confirmation email sent to the generated random email address
-
Click the Verifying Email Link:
- The confirmation email contains a verification link
- The system extracts and clicks this link to verify the email address
-
Set Up Password:
- After verifying the email, the system prompts the user to set up a password
-
Login:
- Using the verified email and the newly set password
-
Verify That the User is Logged In:
- After logging in, the system verifies that the user is successfully logged in by checking for certain elements or user information on the profile page