This project contains a python script that inspects a PostgreSQL-compliant database with a randomly generated schema and generates functional tests for it. The tests cover the SELECT, UPDATE, DELETE, and INSERT statements and test various language functions, operators, and data types.
- Docker
- Clone this repository:
git clone https://github.com/<your-username>/database-test-generator.git
- Navigate to the directory containing the cloned repository:
cd database-test-generator
- Start the python and PostgreSQL services using Docker Compose:
docker-compose up
This will start the python and postgres services and run the test_generator.py script against the PostgreSQL database. The tests will be printed to the terminal.
- To stop the services, press CTRL+C in the terminal.
This project is licensed under the MIT License. See LICENSE for details.
Here are some screenshots of the conversation used to generate this project: