Installation
To install Trusys, use the following command:Verify Installation
To ensure trusys is installed correctly, run:Login
Authenticate with your API Key<your_api_key> with the API key from your workspace. Learn how to create an API Key
Functional Evaluation
-
Run Evaluation with Custom Application and Prompt Library
-
If using custom application
-
Here the
applicationPathswitch should point to the local path of the custom provider file that you have written. - After the run, you’ll receive a link to view results online. Log in with your registered email to access the test summary.
-
You can specify an output file when running evaluations. The file format is determined by the extension you provide.
Currently supported extensions:
.txt, .json, .html, .yaml, .csv. The generated output file will be automatically saved to your local environment. -
Caching is disabled by default. Use the
--cacheflag to enable response caching during your application’s evaluations, improving performance by reusing successful API responses while excluding error responses to support retries and debugging.
Security Evaluation
-
Run Red Team Security Evaluation
-
If using custom application
-
Here the
applicationPathswitch should point to the local path of the custom provider file that you have written. - After the run, you’ll receive a link to view results online. Log in with your registered email to access the test summary.
-
You can specify an output file when running evaluations. The file format is determined by the extension you provide.
Currently supported extensions:
.txt, .json, .html, .yaml, .csv. The generated output file will be automatically saved to your local environment. -
Caching is disabled by default. Use the
--cacheflag to enable response caching during your application’s evaluations, improving performance by reusing successful API responses while excluding error responses to support retries and debugging.
Exit Code
The Trusys CLI returns specific exit codes to help you integrate testing into your CI/CD pipelines and automation workflows. You can access the exit code using the$LASTEXITCODE variable (PowerShell/Windows) or $? (Unix/Linux/Mac).
Exit Code Values
The CLI returns the following exit codes:
0– All test cases passed successfully with no failures.100– At least one test case failed. This indicates that your application did not meet the expected evaluation criteria for one or more test cases.1– An error occurred during execution. This could be due to configuration issues, authentication failures, network errors, or other operational problems unrelated to test case failures.