Skip to content

Commit 1a2f0ab

Browse files
TanayParikhdougbu
andauthored
Backport components-e2e CI Pipeline Fixes to release/6.0 (#38815)
* Quarantine CanAddAndDisposeRootComponents (#38693) * Fix `components-e2e` Pipeline (#38704) * Fix `components-e2e` Pipeline Support for the `QuarantinedTest` attribute. Using the `Quarantined` trait defined here: https://github.com/dotnet/aspnetcore/blob/ba18614ec220c1209a3976f66aacc2c761568931/src/Testing/src/xunit/QuarantinedTestTraitDiscoverer.cs#L18 Extension of #38693 which got auto-merged. * Update components-e2e-tests.yml * PR Feedback * Update components-e2e-tests.yml - I pointed to an `xUnit` example, sorry * PR Feedback * PR Feedback * Update artifacts dir Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com> Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
1 parent f5e969b commit 1a2f0ab

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.azure/pipelines/components-e2e-tests.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,36 @@ jobs:
4343
displayName: NPM install
4444
- script: .dotnet/dotnet build ./src/Components/test/E2ETest -c $(BuildConfiguration) --no-restore
4545
displayName: Build
46-
- script: .dotnet/dotnet test ./src/Components/test/E2ETest -c $(BuildConfiguration) --no-build --logger trx
46+
- script: .dotnet/dotnet test ./src/Components/test/E2ETest -c $(BuildConfiguration) --no-build --filter 'Quarantined!=true|Quarantined=false'
47+
--logger:"trx%3BLogFileName=Microsoft.AspNetCore.Components.E2ETests.trx"
48+
--logger:"html%3BLogFileName=Microsoft.AspNetCore.Components.E2ETests.html"
49+
--results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)/Unquarantined
4750
displayName: Run E2E tests
51+
- script: .dotnet/dotnet test ./src/Components/test/E2ETest -c $(BuildConfiguration) --no-build --filter 'Quarantined=true' -p:RunQuarantinedTests=true
52+
--logger:"trx%3BLogFileName=Microsoft.AspNetCore.Components.E2ETests.trx"
53+
--logger:"html%3BLogFileName=Microsoft.AspNetCore.Components.E2ETests.html"
54+
--results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)/Quarantined
55+
displayName: Run Quarantined E2E tests
56+
continueOnError: true
4857
- task: PublishTestResults@2
4958
displayName: Publish E2E Test Results
5059
inputs:
5160
testResultsFormat: 'VSTest'
5261
testResultsFiles: '*.trx'
53-
searchFolder: '$(Build.SourcesDirectory)/src/Components/test/E2ETest/TestResults'
62+
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)/Unquarantined'
5463
testRunTitle: ComponentsE2E-$(AgentOsName)-$(BuildConfiguration)-xunit
5564
condition: always()
65+
- task: PublishTestResults@2
66+
displayName: Publish Quarantined E2E Test Results
67+
inputs:
68+
testResultsFormat: 'VSTest'
69+
testResultsFiles: '*.trx'
70+
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)/Quarantined'
71+
testRunTitle: Quarantine-$(AgentOsName)-$(BuildConfiguration)-xunit
72+
mergeTestResults: true
73+
condition: always()
74+
5675
artifacts:
5776
- name: Components_E2E_Test_Logs
58-
path: ./src/Components/test/E2ETest/TestResults
77+
path: '$(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)'
5978
publishOnError: true

src/Components/test/E2ETest/Tests/JSRootComponentsTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ protected override void InitializeAsyncCore()
3636
[InlineData(false, true)]
3737
[InlineData(true, false)]
3838
[InlineData(true, true)]
39+
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/38613")]
3940
public void CanAddAndDisposeRootComponents(bool intoBlazorUi, bool attachShadowRoot)
4041
{
4142
var message = app.FindElement(By.Id("message"));

0 commit comments

Comments
 (0)