Skip to content

RowenaRavenclawWithExtraClaws/AutomationTesting

Repository files navigation

Automation Testing

This project automates and tests the registration page for the phptravels website. It is a little bit primitive, but still elegant.

Motivation

As a part of learning software testing techniques, this project is an a attempt to create an automation testing framework.

Technologies and third-party packages

Components

This project is built with object oriented design, it has five main classes and six main 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.

Other files:

  • 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.

Installation

Just clone the repo and run the main.py script (assume having the required packages stated above).

How it works

by running the main.py script in terminal (python main.py):

  • 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.

Limitations

  • 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.

About

This project automates a registration page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages