V14 QA fixed E2E tests for SQL server (#17122)

* Updated version of test helpers

* Added option to run smoke tests

* Found the issue

* Fixed pipeline

* Removed duplicate file creation

* Removed

* Always run sql server tests

* Removed unused parameter

* Enables sqlServer E2E to run on pipeline

* Removed comment
This commit is contained in:
Andreas Zerbst
2024-09-25 07:04:12 +02:00
committed by GitHub
parent 264fbb6987
commit e4dacf5c8c
5 changed files with 33 additions and 32 deletions

View File

@@ -5,10 +5,6 @@ parameters:
displayName: Run SQL Server Integration Tests
type: boolean
default: false
- name: sqlServerAcceptanceTests
displayName: Run SQL Server Acceptance Tests
type: boolean
default: false
- name: myGetDeploy
displayName: Deploy to MyGet
type: boolean
@@ -553,8 +549,6 @@ stages:
- job:
displayName: E2E Tests (SQL Server)
# condition: or(eq(stageDependencies.Build.A.outputs['build.NBGV_PublicRelease'], 'True'), ${{parameters.sqlServerAcceptanceTests}}) # Outcommented due to timeouts
condition: eq(${{parameters.sqlServerAcceptanceTests}}, True)
variables:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
@@ -590,7 +584,8 @@ stages:
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)" | Out-File .env
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
@@ -708,7 +703,7 @@ stages:
dependsOn:
- Unit
- Integration
# - E2E
# - E2E
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.myGetDeploy}}))
jobs:
- job:

View File

@@ -4,12 +4,12 @@ pr: none
trigger: none
schedules:
- cron: '0 0 * * *'
displayName: Daily midnight build
branches:
include:
- v14/dev
- v15/dev
- cron: '0 0 * * *'
displayName: Daily midnight build
branches:
include:
- v14/dev
- v15/dev
variables:
nodeVersion: 20
@@ -24,8 +24,8 @@ variables:
NODE_OPTIONS: --max_old_space_size=16384
parameters:
- name: runSqlServerE2ETests
displayName: Run the SQL Server E2E Tests
- name: runSmokeTests
displayName: Run the smoke tests
type: boolean
default: false
@@ -206,7 +206,10 @@ stages:
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: npm run test --ignore-certificate-errors
- ${{ if eq(parameters.runSmokeTests, true) }}:
pwsh: npm run smokeTest --ignore-certificate-errors
${{ else }}:
pwsh: npm run test --ignore-certificate-errors
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
@@ -242,7 +245,6 @@ stages:
- job:
displayName: E2E Tests (SQL Server)
condition: and(succeeded(), ${{ eq(parameters.runSqlServerE2ETests, true) }})
timeoutInMinutes: 180
variables:
# Connection string
@@ -279,7 +281,8 @@ stages:
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)" | Out-File .env
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
@@ -350,7 +353,10 @@ stages:
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: npm run test --ignore-certificate-errors
- ${{ if eq(parameters.runSmokeTests, true) }}:
pwsh: npm run smokeTest --ignore-certificate-errors
${{ else }}:
pwsh: npm run test --ignore-certificate-errors
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest

View File

@@ -26,7 +26,7 @@ steps:
useSameBranch: true
waitForQueuedBuildsToFinish: false
storeInEnvironmentVariable: false
templateParameters: 'sqlServerIntegrationTests: true, sqlServerAcceptanceTests: true, forceReleaseTestFilter: true, myGetDeploy: true, isNightly: true'
templateParameters: 'sqlServerIntegrationTests: true, forceReleaseTestFilter: true, myGetDeploy: true, isNightly: true'
authenticationMethod: 'OAuth Token'
enableBuildInQueueCondition: false
dependentOnSuccessfulBuildCondition: false