-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tooling] add playwright tests into azure pipeline #9652
Conversation
This reverts commit ce9c186.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very neat. I just read through and the code and launched the pipeline again. I had a few more questions.
@@ -2,3 +2,4 @@ | |||
# See: https://playwright.dev/docs/test-timeouts | |||
#TEST_TIMEOUT=30000 | |||
#EXPECT_TIMEOUT=5000 | |||
#BASE_URL=http://localhost:8000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the app services have this environment variable. There is already an APP_URL variable though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm giving it in here
BASE_URL: "https://dev-talentcloud.tbs-sct.gc.ca" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think App services would need this.
Also this pipeline can be used to run against any env like UAT and is different from APP_URL
- script: CYPRESS_INSTALL_BINARY=/opt/cypress/13.10.0/cypress.zip pnpm install cypress | ||
displayName: "Install Cypress" | ||
|
||
- script: pnpm install --no-frozen-lockfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it install dependencies and rebuild the app a second time in this stage? Isn't that the purpose of the first stage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason is that we had to install the deps on the agent that is running the tests. There was some security issue with the Talentcloud project that forced the deps downloaded from the agent instead of from the feed.
Same steps with another test pipeline works without having to install the deps but not with our TalentCloud project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try get the convo from Daniel related to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop the first stage entirely then? Is there any point to it if we're just going to rebuild it again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop the first stage entirely then? Is there any point to it if we're just going to rebuild it again?
would check with Daniel on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah Daniel also feels that its redundant at this point to have that stage. Will try disconnect it first if it passes then it should be completely good to go. Thanks for catching that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed build stage in 53d7f44 !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm playwright stuff looks great π I'd just wait on @petertgiles approval though, I just looked at the local playwright config π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how this is going to work out. π If you want to merge this pipeline as a work-in-progress it's not going to affect anything else, though.
resourceGroupName: "rg_tbs_talent_2_PaaS" | ||
vertical: "dev" | ||
storageAccountName: "sttalclddevcacstdl" | ||
storageContainer: "playwright-results" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this container automatically clean up old results?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have set a lifecycle rule on the container level to delete older results. Currently it is more than 30 days old.
vmImage: ubuntu-22.04 | ||
- job: run_playwright_tests | ||
displayName: Run Playwright tests | ||
timeoutInMinutes: 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this is not long enough. It's timing out for me, though it completes in around 25 minutes in GH.
I know its a new horizon but I'm confident on it. πΊ |
π€ Resolves #7999
π Introduction
This PR integrates playwright tests into Azure pipeline so that the tests can be triggered against the dev verticals.
Currently it runs against dev environment.
π΅οΈ Details
Below is the Dev Pipeline that got set up to run playwright tests
Basically the pipeline got split into 2 stages as Build and Test stage.
Build stage
Builds the latest main and creates the artifact
Test Stage
This stage downloads the artifact that created on the prev stage and feeds off to a self hosted VM.
Self Hosted VM
This VM is set up to run playwright tests with all the required dependencies and white listed from the VPN sites like the dev environment.
The tests results are stored in VM but now got uploaded in Azure Storage container for easy access
Storage Container Path
https://portal.azure.com/#@056gc.onmicrosoft.com/resource/subscriptions/e45226c5-f9e9-4979-9016-96ba27b156cb/resourceGroups/rg_tbs_talent_2_PaaS/providers/Microsoft.Storage/storageAccounts/sttalclddevcacstdl/containersList
This PR just set up infrastructure for E2E tests running against dev verticals.
Tests needs to be modified to run against GCKey logins in a diff issue.
π§ͺ Testing
**Need Azure access to test this
πΈ Screenshot