Skip to content

Commit 93bcfff

Browse files
authored
test: adding a basic manual e2e test for mcp server (#320)
* test: adding a basic manual e2e test for mcp server * chore: adding missing changeset file * Re-run ai style check * Re-run ai style check * chore: removing exec since it interferes with trap
1 parent ba78a5a commit 93bcfff

14 files changed

+1491
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### test: adding a basic manual e2e test for mcp server - @alocay PR #320
2+
3+
Adding some basic e2e tests using [mcp-server-tester](https://github.com/steviec/mcp-server-tester). Currently, the tool does not always exit (ctrl+c is sometimes needed) so this should be run manually.
4+
5+
### How to run tests?
6+
Added a script `run_tests.sh` (may need to run `chmod +x` to run it) to run tests. Basic usage found via `./run_tests.sh -h`. The script does the following:
7+
8+
1. Builds test/config yaml paths and verifies the files exist.
9+
2. Checks if release `apollo-mcp-server` binary exists. If not, it builds the binary via `cargo build --release`.
10+
3. Reads in the template file (used by `mcp-server-tester`) and replaces all `<test-dir>` placeholders with the test directory value. Generates this test server config file and places it in a temp location.
11+
4. Invokes the `mcp-server-tester` via `npx`.
12+
5. On script exit the generated config is cleaned up.
13+
14+
### Example run:
15+
To run the tests for `local-operations` simply run `./run_tests.sh local-operations`

0 commit comments

Comments
 (0)