1.2 KiB
1.2 KiB
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
-
Install Test Dependencies: It is recommended to run tests in a virtual environment.
pip install -r requirements-test.txtEnsure
requirements.txtdependencies are also installed if they haven't been already:pip install -r requirements.txt
Running Tests
To run the tests, use pytest:
pytest test_azure_maps_mcp.py
Options
-
Verbose output:
pytest -v test_azure_maps_mcp.py -
Show print output:
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.