---
title: "Discussion on \"Integration tests for agent tools that run code: fixtures, cleanup, labels and budgets\" | Hashnode"
description: "Discussion on \"Integration tests for agent tools that run code: fixtures, cleanup, labels and budgets\". Your agent's run_code tool is probably tested with a mock: call the tool, assert the mock was called with the right command, return a canned result. That test proves your code calls a function. It doe"
url: "https://hashnode.com/posts/integration-tests-for-agent-tools-that-run-code-fixtures-cleanup-labels-and-budgets/6b07864896e1c156a6469dd7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Integration tests for agent tools that run code: fixtures, cleanup, labels and budgets](https://sandscale.hashnode.dev/integration-tests-for-agent-tools-that-run-code-fixtures-cleanup-labels-and-budgets?utm_source=hashnode&utm_medium=feed)

Your agent's run\_code tool is probably tested with a mock: call the tool, assert the mock was called with the right command, return a canned result. That test proves your code calls a function. It doe

48m ago · 5 min read · sandscale.hashnode.dev  
Read the article

-   [#testing](https://hashnode.com/tag/testing)
-   [#ai-agents](https://hashnode.com/tag/ai-agents)
-   [#sandbox](https://hashnode.com/tag/sandbox)
-   [#integration-testing](https://hashnode.com/tag/integration-testing)

## Written by

[Sandscale](https://hashnode.com/@sandscale)

@sandscale

  
[View profile](https://hashnode.com/@sandscale)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
