Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 68 additions & 3 deletions .azure/pipelines/components-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,75 @@ variables:
- template: /eng/common/templates/variables/pool-providers.yml

jobs:
# CoreCLR runtime E2E tests (UseMonoRuntime=false) — runs first for faster feedback
# TEMPORARY: narrowed to StatePersistenceTest only to debug disk-space issues
Comment on lines 49 to +53
- template: jobs/default-build.yml
parameters:
jobName: Components_E2E_Test_CoreCLR
jobDisplayName: "Test: Blazor E2E tests on Linux (CoreCLR)"
agentOs: Linux
use1ESUbuntu: true
isAzDOTestingJob: true
enablePublishTestResults: false
timeoutInMinutes: 120
steps:
- script: git submodule update --init
displayName: Update submodules
- script: ./restore.sh
displayName: Run restore.sh
- script: npm ci
displayName: NPM install
- script: npm run build
displayName: Build JS
- script: .dotnet/dotnet build ./src/Components/test/E2ETest -c $(BuildConfiguration) /p:UseMonoRuntime=false
displayName: Build (CoreCLR)
- script: |
set -eo pipefail

# TEMPORARY: Run only StatePersistenceTest to debug CoreCLR WASM failures without exhausting disk.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this temporary for the PR, or to be merged?

.dotnet/dotnet test ./src/Components/test/E2ETest \
-c $(BuildConfiguration) \
--no-build \
--filter 'Quarantined!=true&FullyQualifiedName~StatePersistenceTest' \
-p:VsTestUseMSBuildOutput=false \
--logger:"trx%3BLogFileName=Microsoft.AspNetCore.Components.E2ETests.trx" \
--logger:"html%3BLogFileName=Microsoft.AspNetCore.Components.E2ETests.html" \
--results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)/Unquarantined \
| tee e2e-test-output.log

if grep -q "No test matches the given testcase filter" e2e-test-output.log
then
echo "##vso[task.logissue type=error] No tests matched the filter."

exit 1
fi

# TEMPORARY: min_total check disabled while running single test class
displayName: Run E2E tests (CoreCLR)
- task: PublishTestResults@2
displayName: Publish E2E Test Results (CoreCLR)
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '*.trx'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)/Unquarantined'
testRunTitle: ComponentsE2E-CoreCLR-$(AgentOsName)-$(BuildConfiguration)-xunit
condition: always()

artifacts:
- name: Components_E2E_CoreCLR_Logs
path: artifacts/log/
publishOnError: true
includeForks: true
- name: Components_E2E_CoreCLR_Test_Logs
path: '$(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)'
includeForks: true
publishOnError: true

# Mono runtime (default) E2E tests
- template: jobs/default-build.yml
parameters:
jobName: Components_E2E_Test
jobDisplayName: "Test: Blazor E2E tests on Linux"
jobDisplayName: "Test: Blazor E2E tests on Linux (Mono)"
agentOs: Linux
use1ESUbuntu: true
isAzDOTestingJob: true
Expand Down Expand Up @@ -121,15 +186,15 @@ jobs:
testResultsFormat: 'VSTest'
testResultsFiles: '*.trx'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)/Unquarantined'
testRunTitle: ComponentsE2E-$(AgentOsName)-$(BuildConfiguration)-xunit
testRunTitle: ComponentsE2E-Mono-$(AgentOsName)-$(BuildConfiguration)-xunit
condition: always()
- task: PublishTestResults@2
displayName: Publish Quarantined E2E Test Results
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '*.trx'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(BuildConfiguration)/Quarantined'
testRunTitle: Quarantine-$(AgentOsName)-$(BuildConfiguration)-xunit
testRunTitle: Quarantine-Mono-$(AgentOsName)-$(BuildConfiguration)-xunit
mergeTestResults: true
condition: always()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
<Compile Include="$(SharedSourceRoot)Process\**\*.cs" LinkBase="Shared" />
</ItemGroup>

<!-- Exclude threading test files when building with CoreCLR (UseMonoRuntime=false) since ThreadingApp requires Mono -->
<ItemGroup Condition="'$(UseMonoRuntime)' == 'false'">
<Compile Remove="Tests\ThreadingAppTest.cs" />
<Compile Remove="Tests\ThreadingAppHostedTest.cs" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.AspNetCore" />
<Reference Include="Microsoft.AspNetCore.Authentication.Core" />
Expand Down Expand Up @@ -74,13 +80,14 @@
<ProjectReference Include="..\testassets\Components.TestServer\Components.TestServer.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\HostedInAspNet.Client\HostedInAspNet.Client.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\HostedInAspNet.Server\HostedInAspNet.Server.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\ThreadingApp.Server\ThreadingApp.Server.csproj" />
<!-- Threading requires Mono; exclude when building with CoreCLR (UseMonoRuntime=false) -->
<ProjectReference Include="..\..\WebAssembly\testassets\ThreadingApp.Server\ThreadingApp.Server.csproj" Condition="'$(UseMonoRuntime)' != 'false'" />
</ItemGroup>

<ItemGroup Condition="'$(TestTrimmedOrMultithreadingApps)' != 'true'">
<ProjectReference Include="..\..\benchmarkapps\Wasm.Performance\TestApp\Wasm.Performance.TestApp.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\StandaloneApp\StandaloneApp.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\ThreadingApp\ThreadingApp.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\ThreadingApp\ThreadingApp.csproj" Condition="'$(UseMonoRuntime)' != 'false'" />
<ProjectReference Include="..\testassets\BasicTestApp\BasicTestApp.csproj" />
<ProjectReference Include="..\testassets\GlobalizationWasmApp\GlobalizationWasmApp.csproj" />
<ProjectReference Include="..\..\WebAssembly\testassets\Wasm.Prerendered.Server\Wasm.Prerendered.Server.csproj" />
Expand All @@ -97,7 +104,7 @@

<ProjectReference Include="..\..\WebAssembly\testassets\Wasm.Prerendered.Server\Wasm.Prerendered.Server.csproj" Targets="Build;Publish" Properties="BuildProjectReferences=false;TestTrimmedOrMultithreadingApps=true;PublishDir=$(MSBuildThisFileDirectory)$(OutputPath)trimmed-or-threading\Wasm.Prerendered.Server\;" />

<ProjectReference Include="..\..\WebAssembly\testassets\ThreadingApp\ThreadingApp.csproj" Targets="Build;Publish" Properties="BuildProjectReferences=false;TestTrimmedOrMultithreadingApps=false;PublishDir=$(MSBuildThisFileDirectory)$(OutputPath)trimmed-or-threading\ThreadingApp\;" />
<ProjectReference Include="..\..\WebAssembly\testassets\ThreadingApp\ThreadingApp.csproj" Condition="'$(UseMonoRuntime)' != 'false'" Targets="Build;Publish" Properties="BuildProjectReferences=false;TestTrimmedOrMultithreadingApps=false;PublishDir=$(MSBuildThisFileDirectory)$(OutputPath)trimmed-or-threading\ThreadingApp\;" />

<ProjectReference Include="..\testassets\Components.TestServer\Components.TestServer.csproj" Targets="Build;Publish" Properties="BuildProjectReferences=false;TestTrimmedOrMultithreadingApps=true;_SkipReferencedProjectPublishAssets=true;PublishDir=$(MSBuildThisFileDirectory)$(OutputPath)trimmed-or-threading\Components.TestServer\;" />
</ItemGroup>
Expand Down
Loading