The aigne test command executes automated tests for your agents and skills. It provides a built-in mechanism for unit and integration testing to ensure your agents and the tools they rely on function correctly before deployment.
Usage
Basic Syntax
aigne test [path]Arguments
| Argument | Description |
|---|---|
[path] | Optional. The path to the directory containing your agents and their corresponding test files. If omitted, the command searches for tests in the current directory. |
Description
The command automatically discovers and runs test files within your project. For instance, the default AIGNE project template includes a sandbox.test.js file designed to verify the functionality of the sandbox.js skill. The aigne test command will execute such files to validate your agent's capabilities.
Examples
Run tests in the current directory
To execute test cases for the AIGNE project located in your current working directory, run the command without any arguments:
aigne testRun tests in a specific directory
If your agents are located in a different directory, you can specify the path to that directory:
aigne test path/to/agentsNext Steps
After ensuring your agents pass all tests, you can proceed to serve them for integration or deploy them as a service.