J4N*_*J4N 5 testing nunit azure-devops
我们有一个 PR 由于我们的测试集而失败了。他们仅因此 PR 而失败,并出现以下错误:
The active test run was aborted. Reason: Test host process crashed : Unhandled Exception: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
Run Code Online (Sandbox Code Playgroud)
它总是因这个错误而崩溃,而其他分支工作正常。总是相同的例外,但并非每次都在同一位置。我们尝试启用诊断,但它绝对没有提供任何附加信息:
##[debug]ProxyRunRequest: HandleLogMessage Entered
##[error]RunMessage : The active test run was aborted. Reason: Test host process crashed : Unhandled Exception: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
##[debug]Processed: ##vso[task.logissue type=error;]RunMessage : The active test run was aborted. Reason: Test host process crashed : Unhandled Exception: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
Run Code Online (Sandbox Code Playgroud)
我们使用Nunit,我们的YML的测试部分如下:
- task: VSTest@2
timeoutInMinutes: 180
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '*.Test*.dll'
searchFolder: '$(System.DefaultWorkingDirectory)/$(buildConfiguration)'
codeCoverageEnabled: false
platform: 'Any CPU'
uiTests: false
configuration: '$(buildConfiguration)'
runInParallel: true
resultsFolder: 'testResults'
runSettingsFile: '$(Build.SourcesDirectory)\azure-tests.runsettings'
rerunFailedTests: true
Run Code Online (Sandbox Code Playgroud)
PR 大约有 200 个文件,我们找不到可能导致问题的原因,特别是因为我们花了很多时间进行测试,因为它对我们来说是一个关键功能。
知道我们可以做些什么来更好地了解问题所在吗?或者什么可能导致这个异常?