* Added appsettings * Added test setup for different config * Added appsettings for external login * Added acceptance tests * Updated pipelines * Updated solution file * V15 QA Added external login provider tests and split pipeline into templates (#20049) * Added setup for external login * Started on yaml * Added test file * Updated pipeline * Use env vars * Added env variables and commented out test we don't need to run * Removed list from matrix * Updated condition * Updated package path * Updated testFolder * double slash * Updated condition * Updated condition again * Added port * Removed redundant values * Set as env vars * Added env vars beneath matrix * Get env * Updated naming * Updated usage of values * Added a check for client id, to see if value set * Moved env out of pool * Tried moving env * Trying to fix the env being empty * Removed env * Updated name of variable * Fixed A cyclical reference * Updated typo * More logging * Reverted change * Added env * Added env to tests * Cleaned up * Added yaml template files * Updated nighly pipepline to use templates * Updated sln * Split yaml into templates for e2e setup * Updated pipeline * Updated solution file * Set value * Added if statement * Added variables * Set default values * Updated values * Updated condition * Run multiple tests * Added env * Updated from parameter to variable * Fixed condition * Fixed condition to use actual value * Updated npx wait on command * Updated pwsh * Updated port again * Updated port value * Updated wait on * Updated condition * Restructured * Updated var * Updated run application steps * Added echo * Updated to boolean * Updated conditions * Updated test template usage * Added databaseType * Added another databaseType * Split up templates * Fixed indentation * Updated condition * updated path * removed build from path * Updated conditions for azureAd * Fixed indentation * Updated to single qoutes * Cleaned up * Removed unused file * Clarified namin * Moved * Updated pipeline, not done * Updated locator * Updated pipelines * Updated test helpers package * Skipped build stage for default app settings tests * Updated password var * Updated locators * Updated defaultconfig build setup * Split E2E stage in two * Added parameter for skipping integration tests * Cleaned up * Added ASPNETCORE_URLS * V15 QA acceptance tests with appsettings (#19550) * Start of appsetting * Updated setup of playwright * Adjusted the pipeline * Updated appsetting * Added install test * Added comments * Updated pipeline * Updated development app settings * Commented tests out * comment * Added if statement * Updated pipeline * Fixed condition * Changed to production * Added a log * Updated copy item * Added * Updated app settings * Updated pipeline * Moved playwright login * Updated pipeline * Updated app setting * Updated nightly * Updated appsettings * Updated get * Updated wait on * Updated appsettings * Updated connection string * Updates * Skips code * Updated variable * Updated pipeline * We want to always retain the trace, to see if the test runs as expected on the pipeline * Added a temporary wait till port is open * Fixed condition * Added missing tcp for wait on * Updated URL env * Updated setup * Fixed string * Updated locator * Split tests into SQLite and SQLServer * Updated pipeline to run all tests * Retain trace on failure * Added testFolder var * Added appsettings and program for delivery api tests * Updated playwright config * Split test runners into defaultconfig and different app settings * Added delivery api tests * Cleaned up tests * Bumped version * Updated pipeline * Small fixes * Added password * Updated connection string * Fixed * Removed quotes * Removed unnecessary connection string * Added missing password * Cleaned up * Cleaned up * Cleaned up * Updated to use helpers * Bumped version * Updated helper usage * Added password to variables and a condition * Added check * Indented value * Fixed condition * More updates * Updated variable * Removed settings * Updated delivery api tests * Bumped version * Updated test * Removed unnecessary variables * Updates based on copilot comments * Fixed merge conflict * Fixed env creation step * Bumped version * Updated tests to use new helper * Updated helper * Updated to string * Moved logic to conditions * bumped version * Use new name for helper * Remove echo * Added variable
107 lines
3.3 KiB
YAML
107 lines
3.3 KiB
YAML
parameters:
|
|
- name: ASPNETCORE_URLS
|
|
type: string
|
|
default: ''
|
|
|
|
- name: testCommand
|
|
type: string
|
|
default: ''
|
|
|
|
- name: port
|
|
type: string
|
|
default: ''
|
|
|
|
- name: AZUREB2CTESTUSEREMAIL
|
|
type: string
|
|
default: ''
|
|
|
|
- name: AZUREB2CTESTUSERPASSWORD
|
|
type: string
|
|
default: ''
|
|
|
|
- name: DatabaseType
|
|
type: string
|
|
default: ''
|
|
|
|
steps:
|
|
# Ensures we have the package wait-on installed
|
|
- pwsh: npm install wait-on
|
|
displayName: Install wait-on package
|
|
|
|
# Wait for either the port of the aspnetcore url
|
|
- pwsh: |
|
|
$Port = "${{ parameters.port }}"
|
|
$Url = "${{ parameters.ASPNETCORE_URLS }}"
|
|
|
|
if ($Port -ne "") {
|
|
Write-Host "Waiting on TCP port $Port"
|
|
npx wait-on -v --interval 1000 --timeout 120000 "tcp:$Port"
|
|
} else {
|
|
Write-Host "Waiting on URL $Url"
|
|
npx wait-on -v --interval 1000 --timeout 120000 "$Url"
|
|
}
|
|
displayName: Wait for application
|
|
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
|
|
|
|
# Install Playwright and dependencies
|
|
- pwsh: npx playwright install chromium
|
|
displayName: Install Playwright only with Chromium browser
|
|
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
|
|
|
|
# Test
|
|
- pwsh: ${{ parameters.testCommand }}
|
|
displayName: Run Playwright tests
|
|
continueOnError: true
|
|
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
|
|
env:
|
|
CI: true
|
|
CommitId: $(Build.SourceVersion)
|
|
AgentOs: $(Agent.OS)
|
|
AZUREADB2CTESTUSEREMAIL: ${{ parameters.AZUREB2CTESTUSEREMAIL }}
|
|
AZUREADB2CTESTUSERPASSWORD: ${{ parameters.AZUREB2CTESTUSERPASSWORD }}
|
|
|
|
# Stop application
|
|
- bash: kill -15 $(AcceptanceTestProcessId)
|
|
displayName: Stop application (Linux)
|
|
condition: and(succeededOrFailed(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
|
|
|
|
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
|
|
displayName: Stop application (Windows)
|
|
condition: and(succeededOrFailed(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
|
|
|
|
- ${{ if eq(parameters.DatabaseType, 'SQLServer') }}:
|
|
# Stop SQL Server
|
|
- pwsh: docker stop mssql
|
|
displayName: Stop SQL Server Docker image (Linux)
|
|
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Linux'))
|
|
|
|
- pwsh: SqlLocalDB stop MSSQLLocalDB
|
|
displayName: Stop SQL Server LocalDB (Windows)
|
|
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Windows_NT'))
|
|
|
|
# Copy artifacts
|
|
- pwsh: |
|
|
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
|
|
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
|
|
}
|
|
displayName: Copy Playwright results
|
|
condition: succeededOrFailed()
|
|
|
|
# Publish
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: Publish test artifacts
|
|
condition: succeededOrFailed()
|
|
inputs:
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
|
|
|
|
# Publish test results
|
|
- task: PublishTestResults@2
|
|
displayName: "Publish test results"
|
|
condition: succeededOrFailed()
|
|
inputs:
|
|
testResultsFormat: 'JUnit'
|
|
testResultsFiles: '*.xml'
|
|
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
|
|
testRunTitle: "$(Agent.JobName)"
|