An open API service indexing awesome lists of open source software.

https://github.com/destrex271/pgweb-testing-harness

This is the official project repository for the PostgreSQL Website Testing Harness.
https://github.com/destrex271/pgweb-testing-harness

hacktoberfest project test-automation test-harness testing-tools

Last synced: 5 months ago
JSON representation

This is the official project repository for the PostgreSQL Website Testing Harness.

Awesome Lists containing this project

README

          

# pgweb-testing-harness
This is the official project repository for the PostgreSQL Website Testing Harness Suite.

## Overview

The PGWeb Testing Harness is a set of tests written for the official PostgreSQL website codebase which can be found [here](https://git.postgresql.org/gitweb/?p=pgweb.git;a=summary).
The suite utilizes GitHub Actions to run all the tests and generate a log file which can be used to check for bugs in the parts of the codebase covered by the tests.
The tests are divided into the following categories:

- Functional Tests
- Tests for all forms present on the website.
- Tests for Documentation loading and rendering processes.
- Accessibility Tests
- Miscellaneous Tests

**Note** :- _Functional Tests have been completed. The other tests are remaining as of now and will be completed in the next few weeks._

## Contributing
To contribute to this project kindly follow the following rules:
- All tests files should be in the format **tests_*.py**
- New Tests should be added via a new branch with the name in format / where test type can be functional, accessibility and security.
- Kindly refrain from pushing any unwanted files and folders generated by your text editors and IDEs(for eg .idea/ .code/ etc..)

### Setting up the Development Environment

The testing suite can also be run locally. To do so you need the following prerequisites:
- **act** - CLI Tool GitHub Actions Emulation. Installation source can be found [here](https://github.com/nektos/act).
- **Docker** - Required by act to build containers.Installation source can be found [here](https://docs.docker.com/engine/install/).

After you fork and clone the repository kindly install all the required packages using

`pip install -r requirements.txt`

**_We suggest that you do so in a virtual environment to avoid any unnecessary conflicts._**

To run the tests use:

`act -j run-tests`

Once these prerequisites have been satisfied you can follow the contribution instructions given above and write your tests. Be sure to add the _fixture_teardown() function in the beginning of your tests to avoid unnecessary errors due to Django.

If you are adding new tests kindly add them in the following format: **src/[category]/tests_*.py**.

If you want to add any utility functions kindly add them to **src/utils/*.py**

**Note**: While working on your local machine you might see certain errors and warnings related to pgweb and some other folders, kindly ignore them as these imports are later required in the CI/CD pipeline.