destrex271 / pgweb-testing-harness

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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. 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 <test_type>/<test_name> 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.
  • Docker - Required by act to build containers.Installation source can be found here.

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.

About

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

License:Other


Languages

Language:Python 93.4%Language:Shell 6.6%