Skip to content

Commit

Permalink
Merge pull request #5484 from dfe-analytical-services/dev
Browse files Browse the repository at this point in the history
Merge Dev into Test
  • Loading branch information
mmyoungman authored Dec 31, 2024
2 parents 39d0f9a + 8cf86df commit 7132eb5
Show file tree
Hide file tree
Showing 400 changed files with 27,852 additions and 8,920 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ jobs:

- task: Bash@3
displayName: Build
env:
TECH_DOCS_API_URL: https://dev.statistics.api.education.gov.uk
inputs:
workingDirectory: $(WorkingDirectory)
targetType: inline
Expand Down
62 changes: 62 additions & 0 deletions azure-pipelines-run-ui-test-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
parameters:
- name: jobName
type: string
- name: displayName
type: string
- name: testFolder
type: string
- name: artifactName
type: string

jobs:
- job: ${{ parameters.jobName }}
displayName: ${{ parameters.displayName }}
timeoutInMinutes: 160
cancelTimeoutInMinutes: 10
condition: succeededOrFailed()
pool: ees-ubuntu2204-large
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false

- task: UsePythonVersion@0
displayName: Use Python 3.10
timeoutInMinutes: 5
inputs:
versionSpec: 3.10

- task: AzureKeyVault@2
displayName: Azure Key Vault - s101d01-kv-ees-01
inputs:
azureSubscription: $(SPN_NAME)
KeyVaultName: s101d01-kv-ees-01
SecretsFilter: ees-test-ADMIN-PASSWORD,ees-test-ANALYST-PASSWORD,ees-test-expiredinvite-password,ees-test-NOINVITE-PASSWORD,ees-test-PENDINGINVITE-PASSWORD,ees-alerts-slackapptoken
RunAsPreJob: true

- task: PythonScript@0
displayName: Run tests
condition: succeededOrFailed()
inputs:
scriptPath: tests/robot-tests/scripts/run_tests_pipeline.py
arguments: --admin-pass '"$(ees-test-ADMIN-PASSWORD)"' --analyst-pass '"$(ees-test-ANALYST-PASSWORD)"' --expiredinvite-pass '"$(ees-test-expiredinvite-password)"' --noinvite-pass '"$(ees-test-NOINVITE-PASSWORD)"' --pendinginvite-pass '"$(ees-test-PENDINGINVITE-PASSWORD)"' --env "dev" --file "${{ parameters.testFolder }}" --processes 4 --rerun-attempts 3
# The magic incantation '"$(variable)"'was added by Mark to resolve an issue with Analyst password that contained ampersands.
workingDirectory: tests/robot-tests
env:
SLACK_APP_TOKEN: $(ees-alerts-slackapptoken)

- task: PublishTestResults@2
displayName: Publish test results
inputs:
testResultsFiles: tests/robot-tests/test-results/xunit.xml
failTaskOnFailedTests: true

- task: PublishPipelineArtifact@1
displayName: Publish pipeline artifact
condition: succeededOrFailed()
inputs:
path: tests/robot-tests/test-results/
artifactName: ${{ parameters.artifactName }}
288 changes: 34 additions & 254 deletions azure-pipelines-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,261 +17,41 @@ resources:
ref: refs/heads/dev

jobs:
- job: Public
displayName: Public suite - Robot UI tests
timeoutInMinutes: 160
cancelTimeoutInMinutes: 10
condition: succeededOrFailed()
pool: ees-ubuntu2204-large
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false
- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: Public
displayName: Public suite - Robot UI tests
testFolder: tests/general_public
artifactName: test-results-public

- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: PublishAndAmend
displayName: Publish release and amend suites - Robot UI tests
testFolder: tests/admin_and_public_2
artifactName: test-results-admin-and-public-2

- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: Admin
displayName: Admin suites - Robot UI tests
testFolder: tests/admin
artifactName: test-results-admin

- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: AdminAndPublic
displayName: Admin & public suites - Robot UI tests
testFolder: tests/admin_and_public
artifactName: test-results-admin-public

- template: azure-pipelines-run-ui-test-suite.yml
parameters:
jobName: PublicAPI
displayName: Public API suite - Robot UI tests
testFolder: tests/public_api
artifactName: test-results-admin-public-api

- task: UsePythonVersion@0
displayName: Use Python 3.10
timeoutInMinutes: 5
inputs:
versionSpec: 3.10

- task: AzureKeyVault@2
displayName: Azure Key Vault - s101d01-kv-ees-01
inputs:
azureSubscription: $(SPN_NAME)
KeyVaultName: s101d01-kv-ees-01
SecretsFilter: ees-alerts-slackapptoken
RunAsPreJob: true

- task: PythonScript@0
displayName: Public UI tests
inputs:
scriptPath: tests/robot-tests/scripts/run_tests_pipeline.py
arguments: --admin-pass "test" --analyst-pass "test" --expiredinvite-pass "test" --noinvite-pass "test" --pendinginvite-pass "test" --env "dev" --file "tests/general_public" --processes 4 --rerun-attempts 3
workingDirectory: tests/robot-tests
env:
SLACK_APP_TOKEN: $(ees-alerts-slackapptoken)

- task: PublishTestResults@2
displayName: Publish Test Results
condition: succeededOrFailed()
inputs:
testResultsFiles: tests/robot-tests/test-results/xunit.xml
failTaskOnFailedTests: true

- task: PublishPipelineArtifact@1
displayName: Publish Test Pipeline Artifact
condition: succeededOrFailed()
inputs:
path: tests/robot-tests/test-results/
artifactName: test-results-public

- job: PublishAndAmend
displayName: Publish release and amend suites - Robot UI tests
timeoutInMinutes: 160
cancelTimeoutInMinutes: 10
condition: succeededOrFailed()
pool: ees-ubuntu2204-large
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false

- task: UsePythonVersion@0
displayName: Use Python 3.10
timeoutInMinutes: 5
inputs:
versionSpec: 3.10

- task: AzureKeyVault@2
displayName: Azure Key Vault - s101d01-kv-ees-01
inputs:
azureSubscription: $(SPN_NAME)
KeyVaultName: s101d01-kv-ees-01
SecretsFilter: ees-test-ADMIN-PASSWORD,ees-test-ANALYST-PASSWORD,ees-test-expiredinvite-password,ees-test-NOINVITE-PASSWORD,ees-test-PENDINGINVITE-PASSWORD,ees-alerts-slackapptoken
RunAsPreJob: true

- task: PythonScript@0
displayName: Publish release and amend UI tests
condition: succeededOrFailed()
inputs:
scriptPath: tests/robot-tests/scripts/run_tests_pipeline.py
arguments: --admin-pass '"$(ees-test-ADMIN-PASSWORD)"' --analyst-pass '"$(ees-test-ANALYST-PASSWORD)"' --expiredinvite-pass '"$(ees-test-expiredinvite-password)"' --noinvite-pass '"$(ees-test-NOINVITE-PASSWORD)"' --pendinginvite-pass '"$(ees-test-PENDINGINVITE-PASSWORD)"' --env "dev" --file "tests/admin_and_public_2" --processes 4 --rerun-attempts 3
# The magic incantation '"$(variable)"'was added by Mark to resolve an issue with Analyst password that contained ampersands.
workingDirectory: tests/robot-tests
env:
SLACK_APP_TOKEN: $(ees-alerts-slackapptoken)

- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFiles: tests/robot-tests/test-results/xunit.xml
failTaskOnFailedTests: true

- task: PublishPipelineArtifact@1
displayName: Publish Pipeline Artifact
condition: succeededOrFailed()
inputs:
path: tests/robot-tests/test-results/
artifactName: test-results-admin-and-public-2


- job: Admin
displayName: Admin suites - Robot UI tests
timeoutInMinutes: 160
cancelTimeoutInMinutes: 10
condition: succeededOrFailed()
pool: ees-ubuntu2204-large
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false

- task: UsePythonVersion@0
displayName: Use Python 3.10
timeoutInMinutes: 5
inputs:
versionSpec: 3.10

- task: AzureKeyVault@2
displayName: Azure Key Vault - s101d01-kv-ees-01
inputs:
azureSubscription: $(SPN_NAME)
KeyVaultName: s101d01-kv-ees-01
SecretsFilter: ees-test-ADMIN-PASSWORD,ees-test-ANALYST-PASSWORD,ees-test-expiredinvite-password,ees-test-NOINVITE-PASSWORD,ees-test-PENDINGINVITE-PASSWORD,ees-alerts-slackapptoken
RunAsPreJob: true

- task: PythonScript@0
displayName: Admin UI tests
condition: succeededOrFailed()
inputs:
scriptPath: tests/robot-tests/scripts/run_tests_pipeline.py
arguments: --admin-pass '"$(ees-test-ADMIN-PASSWORD)"' --analyst-pass '"$(ees-test-ANALYST-PASSWORD)"' --expiredinvite-pass '"$(ees-test-expiredinvite-password)"' --noinvite-pass '"$(ees-test-NOINVITE-PASSWORD)"' --pendinginvite-pass '"$(ees-test-PENDINGINVITE-PASSWORD)"' --env "dev" --file "tests/admin" --processes 4 --rerun-attempts 3
workingDirectory: tests/robot-tests
env:
SLACK_APP_TOKEN: $(ees-alerts-slackapptoken)

- task: PublishTestResults@2
displayName: Publish Test Results
condition: succeededOrFailed()
inputs:
testResultsFiles: tests/robot-tests/test-results/xunit.xml
failTaskOnFailedTests: true

- task: PublishPipelineArtifact@1
displayName: Publish Test Pipeline Artifact
condition: succeededOrFailed()
inputs:
path: tests/robot-tests/test-results/
artifactName: test-results-admin

- job: AdminAndPublic
displayName: Admin & public suites - Robot UI tests
timeoutInMinutes: 160
cancelTimeoutInMinutes: 10
condition: succeededOrFailed()
pool: ees-ubuntu2204-large
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false

- task: UsePythonVersion@0
displayName: Use Python 3.10
timeoutInMinutes: 5
inputs:
versionSpec: 3.10

- task: AzureKeyVault@2
displayName: Azure Key Vault - s101d01-kv-ees-01
inputs:
azureSubscription: $(SPN_NAME)
KeyVaultName: s101d01-kv-ees-01
SecretsFilter: ees-test-ADMIN-PASSWORD,ees-test-ANALYST-PASSWORD,ees-test-expiredinvite-password,ees-test-NOINVITE-PASSWORD,ees-test-PENDINGINVITE-PASSWORD,ees-alerts-slackapptoken
RunAsPreJob: true

- task: PythonScript@0
displayName: Admin public UI tests
inputs:
scriptPath: tests/robot-tests/scripts/run_tests_pipeline.py
arguments: --admin-pass '"$(ees-test-ADMIN-PASSWORD)"' --analyst-pass '"$(ees-test-ANALYST-PASSWORD)"' --expiredinvite-pass '"$(ees-test-expiredinvite-password)"' --noinvite-pass '"$(ees-test-NOINVITE-PASSWORD)"' --pendinginvite-pass '"$(ees-test-PENDINGINVITE-PASSWORD)"' --env "dev" --file "tests/admin_and_public" --processes 4 --rerun-attempts 3
workingDirectory: tests/robot-tests
env:
SLACK_APP_TOKEN: $(ees-alerts-slackapptoken)

- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFiles: tests/robot-tests/test-results/xunit.xml
failTaskOnFailedTests: true

- task: PublishPipelineArtifact@1
displayName: Publish Test Pipeline Artifact
condition: succeededOrFailed()
inputs:
path: tests/robot-tests/test-results/
artifactName: test-results-admin-public

- job: PublicAPI
displayName: Public API suite - Robot UI tests
timeoutInMinutes: 160
cancelTimeoutInMinutes: 10
condition: succeededOrFailed()
pool: ees-ubuntu2204-large
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchDepth: 5
fetchTags: false

- task: UsePythonVersion@0
displayName: Use Python 3.10
timeoutInMinutes: 5
inputs:
versionSpec: 3.10

- task: AzureKeyVault@2
displayName: Azure Key Vault - s101d01-kv-ees-01
inputs:
azureSubscription: $(SPN_NAME)
KeyVaultName: s101d01-kv-ees-01
SecretsFilter: ees-test-ADMIN-PASSWORD,ees-test-ANALYST-PASSWORD,ees-test-expiredinvite-password,ees-test-NOINVITE-PASSWORD,ees-test-PENDINGINVITE-PASSWORD,ees-alerts-slackapptoken
RunAsPreJob: true

- task: PythonScript@0
displayName: Public API UI tests
inputs:
scriptPath: tests/robot-tests/scripts/run_tests_pipeline.py
arguments: --admin-pass '"$(ees-test-ADMIN-PASSWORD)"' --analyst-pass '"$(ees-test-ANALYST-PASSWORD)"' --expiredinvite-pass '"$(ees-test-expiredinvite-password)"' --noinvite-pass '"$(ees-test-NOINVITE-PASSWORD)"' --pendinginvite-pass '"$(ees-test-PENDINGINVITE-PASSWORD)"' --env "dev" --file "tests/public_api" --processes 4 --rerun-attempts 3
workingDirectory: tests/robot-tests
env:
SLACK_APP_TOKEN: $(ees-alerts-slackapptoken)

- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFiles: tests/robot-tests/test-results/xunit.xml
failTaskOnFailedTests: true

- task: PublishPipelineArtifact@1
displayName: Publish Test Pipeline Artifact
condition: succeededOrFailed()
inputs:
path: tests/robot-tests/test-results/
artifactName: test-results-admin-public-api

#- job: PublicPlaywrightUItest
# displayName: Public suite - Playwright UI tests
Expand Down
Loading

0 comments on commit 7132eb5

Please sign in to comment.