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:
-
Install Miniconda: If you haven't already installed Miniconda, download and install it from the Miniconda website.
-
Clone the Repository: Clone this repository to your local machine using Git:
git clone https://github.com/JJeshua/ddsm-backend-testing-tool.git
- Navigate to the Repository Directory: Move into the directory of the cloned repository:
cd ddsm-backend-testing-tool
- 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.
- Activate the Environment: Activate the newly created environment:
conda activate APITesting
- Verify Installation: You can verify that the environment was installed correctly by running:
conda env list
- 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.
- Deactivate the Environment: When you're done working in the environment, you can deactivate it:
conda deactivate
This repository uses Pytest for testing. You can run all tests easily using the pytest
command.
To run all tests, follow these steps:
- 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
- Navigate to the Project Root Directory: CD to the root directory ddsm-backend-testing-tool.
- Run Pytest: Once you're in the tests directory, simply run the following command to execute all tests:
pytest
- Navigate to the root directory: CD the root directory of ddsm-backend-testing-tool
- Run the Script: Execute the script using Python:
python db_tools.py [action]
- Available Actions:
- populate: This action populates the database with sample data.
- clear: This action clears the entire database.