Skip to content

API testing tool built in Python. Used to test endpoints for DuckPond social network app project.

Notifications You must be signed in to change notification settings

kristijanH1998/ddsm-backend-testing-tool

 
 

Repository files navigation

Setting Up Environment Using Miniconda

This repository utilizes Miniconda to manage its Python environment. The environment.yml file specifies all the dependencies required to recreate the environment.

To set up the environment, follow these steps:

  1. Install Miniconda: If you haven't already installed Miniconda, download and install it from the Miniconda website.

  2. Clone the Repository: Clone this repository to your local machine using Git:

git clone https://github.com/JJeshua/ddsm-backend-testing-tool.git
  1. Navigate to the Repository Directory: Move into the directory of the cloned repository:
cd ddsm-backend-testing-tool
  1. Create the Conda Environment: Create a new Conda environment using the environment.yml file:
conda env create -f environment.yml
pip install -e .

This will create a new environment named APITesting with all the required dependencies installed.

  1. Activate the Environment: Activate the newly created environment:
conda activate APITesting
  1. Verify Installation: You can verify that the environment was installed correctly by running:
conda env list
  1. Start Working: You're all set! You can now start working within this environment. Remember to activate the environment whenever you're working on this project.
  2. Deactivate the Environment: When you're done working in the environment, you can deactivate it:
conda deactivate

Running Tests with Pytest

This repository uses Pytest for testing. You can run all tests easily using the pytest command.

To run all tests, follow these steps:

  1. Activate the Conda Environment: Before running the tests, ensure that you have activated the Conda environment created for this project. If you haven't activated it yet, you can do so by running:
conda activate APITesting
  1. Navigate to the Project Root Directory: CD to the root directory ddsm-backend-testing-tool.
  2. Run Pytest: Once you're in the tests directory, simply run the following command to execute all tests:
pytest

Using the DB Tools

Usage

  1. Navigate to the root directory: CD the root directory of ddsm-backend-testing-tool
  2. Run the Script: Execute the script using Python:
python db_tools.py [action]
  1. Available Actions:
  • populate: This action populates the database with sample data.
  • clear: This action clears the entire database.

About

API testing tool built in Python. Used to test endpoints for DuckPond social network app project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Dockerfile 0.2%