This project automates and tests the registration page for the phptravels website. It is a little bit primitive, but still elegant.
As a part of learning software testing techniques, this project is an a attempt to create an automation testing framework.
- Python 3.7 for object oriented design.
- Selenium 3.141 for driving Firefox natively.
- Firefox geckodriver Linux64 for using Firefox as the main browser for testing.
- Request 2019.4.13 for making http requests.
- Validate_email 1.3 for email validation.
- fpdf 1.7.2 for creating and constructing pdf files.
- main.py: acts as the entry point and the execution script for the project.
- test.py: where all the test cases are written.
- testCase.py: generates all fields required for the sign up form in random fashion.
- testCaseGenerator.py: generates a single test case (registration instance).
- automate.py: automates browser actions like filling the sign up form.
- report.py: constructs bug reports with basic information and screenshots.
- checking.py: implements the text fields criteria stated in the assignment statement.
- logs.txt: saves the http responses for every request to the registration page.
- statement.txt: contains the main guidelines for this project.
- bugReports: A folder which contains pdfs, text files and screenshots for the detected bugs.
Just clone the repo and run the main.py script (assume having the required packages stated above).
- The unittest python package searches for any method that starts with "test" and executes it.
- There are nine such methods located in the test.py script, each contains a single test case with certain conditions like all fields must be valid or last name and email must be invalid and the rest is valid.
- Each method uses the selenium webdriver to automate the registration page for the phptravels website on Firefox using the geckodriver.
- An http interceptor script is run for every request and the response is saved in the logs file.
- each method asserts two main conditions (successful and unsuccessful sign up process) based on the conditions available for the available test case.
- if any of the assertions failed, a screenshot is taken and a full bug report is produced accordingly.
- Its reports are primitive (a table contains basic information and a screenshot shows the browser state when the bug occurred).
- Generation of valid phones and emails is not dynamic.