Cannot run tests in azure pipeline after pro upgrade
Check the docs before asking a question: https://abp.io/docs/latest
Check the samples to see the basic tasks: https://abp.io/docs/latest/samples
The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.
- ABP Framework version: v9.0.4
- UI Type: Blazor Server
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): no
- Exception message and full stack trace:
Starting test execution, please wait... A total of 1 test files matched the specified pattern. The active test run was aborted. Reason: Test host process crashed Results File: /home/vsts/work/_temp/_fv-az630-789_2025-02-06_14_50_52.trx
Test Run Aborted.
- Steps to reproduce the issue:
I just finished upgrading our ABP project to the pro version of the framework. Locally when I ran our application integration tests they would simply crash with no error message given. After much debugging I discovered that this was due to not having the license key in the TestBase project. Upon adding the license key the tests started running correctly. Now when I run our tests in our Azure DevOps pipeline I get the same issue.
So my question is, how can I run the integration tests in an Azure DevOps pipeline when pro modules are installed?
2 Answer(s)
-
0
Hello ,
Can you please try this solution once again
To fix this issue, the ABP Pro license key must be securely stored and passed to the pipeline environment.
- Store ABP_LICENSE_CODE in Azure DevOps Variable Groups.
- Modify azure-pipelines.yml to pass the license key as an environment variable.
- Update TestBase to read the license from Environment.GetEnvironmentVariable().
- Run the pipeline and verify test execution.
This ensures secure ABP Pro license usage in CI/CD while allowing integration tests to run smoothly.
This solution ensures integration tests work in Azure DevOps while keeping the ABP Pro license key secure
Thank you.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
It worked! Thanks.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)