tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Agentic AI > ADK Agent Testing > Boundary Value Testing for ADK Agent Tool Inputs

Boundary Value Testing for ADK Agent Tool Inputs

Author: Venkata Sudhakar

Boundary value testing (BVT) for ADK agent tool inputs targets the edges of valid input ranges where bugs are most likely to hide - the minimum, maximum, and values just inside and outside each boundary. ShopMax India applies BVT to its order processing and pricing tools to ensure that edge-case quantities, zero-value orders, and maximum cart sizes are handled correctly before customers in Mumbai and Delhi can trigger them in production.

For each tool parameter, identify the valid range (e.g. quantity: 1-100), then test five boundary points: below minimum (0), minimum (1), a mid-range value (50), maximum (100), and above maximum (101). The tool must return valid output for the three in-range points and raise a ValueError or return an error dict for the two out-of-range points. pytest.mark.parametrize makes this concise and keeps boundary logic visible in the test report.

The example below applies boundary value testing to a ShopMax India cart quantity tool, covering all five boundary points with parametrize and asserting correct behavior at each.


It gives the following output,

qty=0: correctly rejected
qty=1: accepted, status=added
qty=50: accepted, status=added
qty=100: accepted, status=added
qty=101: correctly rejected
10 passed in 0.08s

Document the valid range for every tool parameter in the tool's docstring so that boundary tests can be generated automatically from the spec. When ranges change (e.g. cart limit raised from 100 to 200 for B2B customers), update both the tool and the boundary test together. Add off-by-one checks for every inclusive boundary since these are the most common source of boundary bugs in e-commerce cart and pricing logic.


 
  


  
bl  br