How to Run an Acumatica Automation Project in an Azure DevOps Pipeline
Integrating your Acumatica Automation Project with Azure DevOps pipelines is a powerful way to enable continuous integration (CI) and continuous delivery (CD) for testing and deploying your automation scripts.
Since Acumatica’s automation project is a console application, running it from a pipeline is absolutely doable — but requires correct configuration of tasks like dotnet build and dotnet run.
In this guide, we’ll walk through how to build, run, and optionally test your Acumatica automation code using Azure DevOps.
Project Type Overview
Acumatica Automation Projects are typically .NET Core console apps designed to interact with Acumatica via API or UI automation.
They don’t follow the usual unit testing structure (like NUnit/XUnit), so using tasks like VSTest or dotnet test won't work unless you explicitly include test frameworks. Instead, you’ll use dotnet run to execute your automation logic directly.
Step-by-Step: Setting Up the Pipeline
1. Create a Pipeline
- Navigate to Pipelines > New Pipeline in Azure DevOps.
- Choose your source repository (e.g., GitHub, Azure Repos).
- Select "Starter pipeline" or choose "ASP.NET Core" template (which works well for console apps).
2. Define Pipeline YAML (Recommended)
Here’s an example azure-pipelines.yml file that:
- Builds the project
- Runs it using dotnet run
- Publishes logs as artifacts
Tip: Replace projectPath with the actual relative path to your .csproj file.
3. Handle Configuration and Secrets
If your automation project needs connection strings, credentials, or environment-specific config:
- Use Pipeline Variables (in the Azure DevOps UI).
- Or reference secrets from Azure Key Vault.
- Pass them as arguments to your application via dotnet run -- myArg1 myArg2.
4. Test It Locally First
Before pushing your pipeline, confirm the automation works by running:
dotnet build -c Release
dotnet run -c Release --project path/to/AutomationProject.csproj
5. Review Logs and Artifacts
After running the pipeline:
- Go to the "Run" tab in Azure DevOps.
- Inspect the build logs and console output.
- Download any logs or files you've published as artifacts.
Add Debug Output
If you're troubleshooting:
arguments: '--configuration $(buildConfiguration) --verbosity detailed'
Add Custom Test Output
If your automation has pass/fail logic:
- Return a non-zero exit code on failure.
- Azure DevOps will automatically mark the run as failed.