.agents/skills/run-integration-tests/SKILL.md
Run the sandbox-api integration tests against a live API instance. Use after making changes to sandbox-api to verify all endpoints still work correctly.
npx skillsauth add blaxel-ai/sandbox run-integration-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Integration tests live in sandbox-api/integration-tests/ and test real HTTP endpoints against a running sandbox-api instance.
Run against an already-running dev environment:
# 1. Start the dev environment first (in another terminal)
docker-compose up dev
# 2. Run integration tests
make integration-test
Let the test script start and stop Docker automatically:
cd sandbox-api/integration-tests
START_API=true ./run_tests.sh
Or with a custom compose file:
DOCKER_COMPOSE_FILE=../docker-compose.yaml START_API=true ./run_tests.sh
cd sandbox-api/integration-tests
API_HOST=<hostname> API_PORT=8080 ./run_tests.sh
cd sandbox-api/integration-tests
API_BASE_URL=http://localhost:8080 go test -v ./tests/filesystem/...
API_BASE_URL=http://localhost:8080 go test -v ./tests/process/...
API_BASE_URL=http://localhost:8080 go test -v ./tests/network/...
API_BASE_URL=http://localhost:8080 go test -v ./tests/mcp/...
API_BASE_URL=http://localhost:8080 go test -v ./tests/codegen/...
# Run a single test by name
API_BASE_URL=http://localhost:8080 go test -v -run TestFilesystemRead ./tests/filesystem/...
| Directory | What It Tests |
|-----------|--------------|
| tests/filesystem/ | File CRUD, directory listing, tree ops, multipart upload |
| tests/process/ | Process execute, logs, stop/kill, shell wrapper |
| tests/network/ | Port monitoring, tunnel config |
| tests/mcp/ | MCP tool registration and invocation |
| tests/codegen/ | File search, grep search, rerank, edit file |
tests/ (or create one)*_test.go file with package testscommon/:package tests
import (
"net/http"
"testing"
"github.com/blaxel-ai/sandbox-api/integration_tests/common"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestMyNewEndpoint(t *testing.T) {
resp, err := common.MakeRequest(http.MethodGet, "/my-endpoint", nil)
require.NoError(t, err)
defer resp.Body.Close()
assert.Equal(t, http.StatusOK, resp.StatusCode)
var result map[string]interface{}
err = common.ParseJSONResponse(resp, &result)
require.NoError(t, err)
}
connection refused: The sandbox-api is not running. Start it with docker-compose up dev firstRELACE_API_KEY or MORPH_API_KEY env vars not set — codegen tools require an LLM provider keydevelopment
Regenerate the OpenAPI reference documentation after adding, modifying, or removing API endpoints in sandbox-api. Run this whenever handler signatures, route paths, or swag annotations change.
development
Run the full end-to-end test suite against a custom sandbox image deployed locally or on Blaxel. Use before merging significant changes to validate the complete sandbox-api binary, not just unit/integration tests.
testing
Deploy a Playwright sandbox (chromium or firefox) on Blaxel and run e2e tests against it. Use to validate that playwright hub images work end-to-end (browser connection, page navigation, DOM interaction) after changes.
development
Start the local sandbox-api development environment with hot-reload. Use when developing or testing changes to the sandbox-api Go code locally.