49 lines
1.2 KiB
Markdown
49 lines
1.2 KiB
Markdown
# Testing Instructions
|
|
|
|
This document provides instructions on how to run the automated tests for the Azure Maps MCP server.
|
|
|
|
## Prerequisites
|
|
|
|
Ensure you have a valid Azure Maps API Key. The tests expect this key to be present in a file named `.apikey` in the root of the project.
|
|
|
|
## Setup
|
|
|
|
1. **Install Test Dependencies**:
|
|
It is recommended to run tests in a virtual environment.
|
|
|
|
```bash
|
|
pip install -r requirements-test.txt
|
|
```
|
|
|
|
Ensure `requirements.txt` dependencies are also installed if they haven't been already:
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
## Running Tests
|
|
|
|
To run the tests, use `pytest`:
|
|
|
|
```bash
|
|
pytest test_azure_maps_mcp.py
|
|
```
|
|
|
|
### Options
|
|
|
|
- **Verbose output**:
|
|
```bash
|
|
pytest -v test_azure_maps_mcp.py
|
|
```
|
|
|
|
- **Show print output**:
|
|
```bash
|
|
pytest -s test_azure_maps_mcp.py
|
|
```
|
|
|
|
## Test Coverage
|
|
|
|
The tests cover:
|
|
- **Basic Map Retrieval**: Verifies fetching a map image using center coordinates and zoom level.
|
|
- **Map with Pushpins**: Verifies fetching a map that includes pushpins.
|
|
- **Error Handling**: Verifies that invalid inputs (e.g., malformed center coordinates) are handled gracefully and return appropriate error messages.
|