Skip to content

documenting an experiment to get chatGPT building a SQL test generator

Notifications You must be signed in to change notification settings

peter-mcconnell/gpt_sql_test_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Test Generator

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.

Requirements

  • Docker

Running the Script

  1. Clone this repository:
git clone https://github.com/<your-username>/database-test-generator.git
  1. Navigate to the directory containing the cloned repository:
cd database-test-generator
  1. 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.

  1. To stop the services, press CTRL+C in the terminal.

License

This project is licensed under the MIT License. See LICENSE for details.

Media

Here are some screenshots of the conversation used to generate this project:

step 2 step 3 step 4 step 5 step 6 step 7 step 8 step 9 step 10 step 11 step 12 step 13 step 14 step 15 step 16

About

documenting an experiment to get chatGPT building a SQL test generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published