Code Files
Aethrix test automation supports embedded C# scripts for custom test logic. Code files let you:
- Build complex request objects programmatically
- Implement custom assertions
- Call utility libraries
- Interact with databases or files
C# Script Steps
The C# Script test step executes inline C# code within the context of a test case. The script has access to:
- Environment and project variables (via the
VariablesAPI) - Generated DTOs from imported API extensions
- Standard .NET libraries
Reusable Actions
A Reusable Action is a named, parameterized C# script that can be called from any test case using a Run Action step. Use reusable actions for logic shared across multiple test cases.
Code Compilation
Aethrix compiles C# scripts at runtime using Roslyn. Compilation errors are shown in the Diagnostics panel.
IntelliSense Support
Aethrix Studio provides IntelliSense (code completion, type hints) in script editors using the RoslynPad-based editor.
:::info Screenshot needed — light/dark 📸
csharp-script-editor-light.png and csharp-script-editor-dark.png — C# script editor with IntelliSense popup
:::