Skip to content

Commit 14908cf

Browse files
Merge pull request #2963 from jasonrandrews/review2
Start tech review for Testcontainers and MCP
2 parents cb77a71 + 466edd3 commit 14908cf

3 files changed

Lines changed: 28 additions & 18 deletions

File tree

content/learning-paths/cross-platform/automate-mcp-with-testcontainers/_index.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
22
title: Automate MCP Server testing using Pytest and Testcontainers
33

4+
draft: true
5+
cascade:
6+
draft: true
7+
48
minutes_to_complete: 60
59

6-
who_is_this_for: This is an intermediate topic for anyone interested in automating their end-to-end testing of MCP (Model Context Protocol) servers using specialized software packages called TestContainers and PyTest.
10+
who_is_this_for: This is an introductory topic for software developers and QA engineers who want to automate integration testing of MCP (Model Context Protocol) servers using Testcontainers and PyTest.
711

812
learning_objectives:
9-
- Understand how TestContainers work for containerized testing of MCP servers.
10-
- Write integration tests for MCP servers using PyTest and TestContainers.
11-
- Configure GitHub Actions to run MCP integration tests in CI/CD pipelines.
13+
- Set up Testcontainers with PyTest for containerized testing of MCP servers
14+
- Write and run integration tests that validate MCP server functionality
15+
- Configure GitHub Actions to automate MCP server testing in CI/CD pipelines
1216

1317
prerequisites:
14-
- A machine that can run Python 3 and Docker.
15-
- Familiarity with [Docker](/install-guides/docker/) and container concepts.
16-
- Basic knowledge of Python and Pytest.
17-
- The [Arm MCP Server](https://github.com/arm/mcp) running with AI assistant client.
18+
- A computer with [Docker](/install-guides/docker/) and Python 3.11 or later installed
19+
- Basic familiarity with Python, PyTest, and container concepts
20+
- Familiarity with the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) specification
1821

1922
author: Neethu Elizabeth Simon
2023

@@ -36,6 +39,11 @@ tools_software_languages:
3639
- Testcontainers
3740
- MCP
3841

42+
shared_path: true
43+
shared_between:
44+
- servers-and-cloud-computing
45+
- laptops-and-desktops
46+
3947
further_reading:
4048
- resource:
4149
title: Arm MCP Server GitHub Repository

content/learning-paths/cross-platform/automate-mcp-with-testcontainers/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ layout: learningpathall
88

99
## What is MCP?
1010

11-
The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. MCP servers provide AI models with context aware capabilities, such as code analysis, knowledge base lookups, and system introspection.
11+
The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. MCP servers provide AI models with context-aware capabilities, such as code analysis, knowledge base lookups, and system introspection.
1212

13-
The Arm MCP Server is a reference implementation that provides AI assistants with tools and knowledge specifically for Arm architecture development, migration, and optimization. It includes capabilities like container architecture checking, code analysis with LLVM-MCA, and access to Arm Learning Paths.
13+
The Arm MCP Server provides AI assistants with tools and knowledge specifically for Arm architecture development, migration, and optimization. It includes capabilities like container architecture checking, code analysis with LLVM-MCA, and a knowledge base with content from Arm Learning Paths and other documentation.
1414

1515
## Why automate MCP server testing?
1616

@@ -25,7 +25,7 @@ MCP servers expose multiple tools that AI assistants can invoke. As these tools
2525

2626
Testcontainers is a Python library that provides lightweight, throwaway instances of Docker containers for testing. Instead of mocking your MCP server, you can spin up the actual Docker container, run tests against it, and tear it down automatically.
2727

28-
![testcontainers alt-text#center](testcontainers.png "Figure 1. Testcontainers Flow")
28+
![Diagram showing Testcontainers workflow: test code creates a Docker container, runs tests against it, and automatically tears it down after completion#center](testcontainers.png "Figure 1. Testcontainers Flow")
2929

3030
This approach offers several benefits:
3131

content/learning-paths/cross-platform/automate-mcp-with-testcontainers/setup-environment.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,18 @@ layout: learningpathall
1010

1111
Before you begin, ensure you have the following installed on your machine:
1212

13-
- Python 3.11 or later
13+
- Python 3.11 or later with the ability to create Python virtual environments
1414
- Docker Engine or Docker Desktop
1515
- Git
1616

17+
If you are on Linux, you need the Python virtual environment package.
18+
19+
For Debian or Ubuntu, run:
20+
21+
```bash
22+
sudo apt install -y python3-venv
23+
```
24+
1725
You can verify Docker is running by executing:
1826

1927
```bash
@@ -84,12 +92,6 @@ testcontainers
8492
pytest
8593
```
8694

87-
You can also install these packages directly:
88-
89-
```bash
90-
pip install testcontainers pytest
91-
```
92-
9395
## Verify your setup
9496

9597
Run a quick verification to ensure everything is configured correctly:

0 commit comments

Comments
 (0)