Skip to content
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

Add playwright tests job #3521

Merged
merged 33 commits into from
Nov 6, 2023
Merged

Add playwright tests job #3521

merged 33 commits into from
Nov 6, 2023

Conversation

taghreed86
Copy link
Contributor

@taghreed86 taghreed86 commented Oct 18, 2023

What changed?
Just adding a new job in deploy.yaml file and this job triggers the Playwright-tests workflow and run it

You can check the run status here and this is the Playwright tests run.

This PR contribute towards #3520 especially for the Regression Test section as after merge this PR you can run the already added playwright acceptance tests against each commit into your branch or into main by just select the Deploy workflow to run and choose from which branch you want to run it as in the below screen shot. This way will give you an indication if your new feature will broke something or not by checking the playwright acceptance tests result after running the workflow.

Screenshot at 13-48-10

@taghreed86 taghreed86 added the exclude from release notes Use this label to exclude a PR from the release notes label Oct 18, 2023
@taghreed86 taghreed86 requested a review from enekofb October 18, 2023 13:50
@taghreed86 taghreed86 self-assigned this Oct 18, 2023
Copy link
Contributor

@enekofb enekofb left a comment

Choose a reason for hiding this comment

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

please @taghreed86 could you add in the PR description how this Pr contributes towards this ticket #3520

For example, if aim to solve the regression journey I think that this job does not uses the code from weave gitops enterprise repo.

@taghreed86 taghreed86 requested a review from enekofb October 19, 2023 07:16
@taghreed86
Copy link
Contributor Author

please @taghreed86 could you add in the PR description how this Pr contributes towards this ticket #3520

For example, if aim to solve the regression journey I think that this job does not uses the code from weave gitops enterprise repo.

Done

@taghreed86 taghreed86 requested a review from enekofb October 26, 2023 20:00
Copy link
Contributor

@enekofb enekofb left a comment

Choose a reason for hiding this comment

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

I think that the unique question that I have is about the expectations and error handling scenario for a failing scenario like the following

As a developer, i have merged the PR intro enterprise
Then smoke tests run passing but playwright tests fails

Doubts from my side are:

  • do we expect this workflow to fail ?
  • would the playwright-smoke-tests job be marked as green?
  • in case that is marked as green, given that we want to understand the stability of old vs new test suite, how we are going to understand in quantitative terms?

I think the ideal behavior is:

  • if playwright tests fail we are able to see a red failure (because we want to use it for measuring stability vs current smoke tests).
  • deploy workflow does not fail cause developers are not expected to recover from this situation (as we are doing PoC).

@taghreed86
Copy link
Contributor Author

I think that the unique question that I have is about the expectations and error handling scenario for a failing scenario like the following

As a developer, i have merged the PR intro enterprise Then smoke tests run passing but playwright tests fails

Doubts from my side are:

  • do we expect this workflow to fail ?
  • would the playwright-smoke-tests job be marked as green?
  • in case that is marked as green, given that we want to understand the stability of old vs new test suite, how we are going to understand in quantitative terms?

I think the ideal behavior is:

  • if playwright tests fail we are able to see a red failure (because we want to use it for measuring stability vs current smoke tests).
  • deploy workflow does not fail cause developers are not expected to recover from this situation (as we are doing PoC).
  1. We expect the playwright- tests workflow to Pass when a developer merged something into main branch of weve-gitops-enterprise repo unless the change that the developer merged break something in the workflows that we covered in the playwright tests.
  2. If the Playwright tests fail in this case the playwright job will mark as Red.
  3. If the playwright tests fail in this case the deploy workflow will fail and from my point of view that's what we need to give the developer indication that there is something wrong in the workflows that the playwright tests are covered were working well and the changes he made leads to the tests become failed.

@taghreed86 taghreed86 requested a review from enekofb November 5, 2023 16:33
@enekofb
Copy link
Contributor

enekofb commented Nov 6, 2023

I think that the unique question that I have is about the expectations and error handling scenario for a failing scenario like the following
As a developer, i have merged the PR intro enterprise Then smoke tests run passing but playwright tests fails
Doubts from my side are:

  • do we expect this workflow to fail ?
  • would the playwright-smoke-tests job be marked as green?
  • in case that is marked as green, given that we want to understand the stability of old vs new test suite, how we are going to understand in quantitative terms?

I think the ideal behavior is:

  • if playwright tests fail we are able to see a red failure (because we want to use it for measuring stability vs current smoke tests).
  • deploy workflow does not fail cause developers are not expected to recover from this situation (as we are doing PoC).
  1. We expect the playwright- tests workflow to Pass when a developer merged something into main branch of weve-gitops-enterprise repo unless the change that the developer merged break something in the workflows that we covered in the playwright tests.
  2. If the Playwright tests fail in this case the playwright job will mark as Red.
  3. If the playwright tests fail in this case the deploy workflow will fail and from my point of view that's what we need to give the developer indication that there is something wrong in the workflows that the playwright tests are covered were working well and the changes he made leads to the tests become failed.

Yes, that makes sense to me beyond the PoC stage. However, for this initial stage, given that we dont really have real datapoints that the workflow wont produce false positives (this is one of the elements to validate), it feels that we should favour not getting in the way of the developer workflow.

I would consider in this poc stage to run it with something like continue-on-error https://github.com/weaveworks/weave-gitops-enterprise/pull/3595/files#diff-07e563e9e96c4e400b69036f9a4ac603dea520acbef2f83237c744ea2ef383e0R173

Then once we have passed the poc stage, to remove it.

Let me know your thoughts.

@taghreed86
Copy link
Contributor Author

I think that the unique question that I have is about the expectations and error handling scenario for a failing scenario like the following
As a developer, i have merged the PR intro enterprise Then smoke tests run passing but playwright tests fails
Doubts from my side are:

  • do we expect this workflow to fail ?
  • would the playwright-smoke-tests job be marked as green?
  • in case that is marked as green, given that we want to understand the stability of old vs new test suite, how we are going to understand in quantitative terms?

I think the ideal behavior is:

  • if playwright tests fail we are able to see a red failure (because we want to use it for measuring stability vs current smoke tests).
  • deploy workflow does not fail cause developers are not expected to recover from this situation (as we are doing PoC).
  1. We expect the playwright- tests workflow to Pass when a developer merged something into main branch of weve-gitops-enterprise repo unless the change that the developer merged break something in the workflows that we covered in the playwright tests.
  2. If the Playwright tests fail in this case the playwright job will mark as Red.
  3. If the playwright tests fail in this case the deploy workflow will fail and from my point of view that's what we need to give the developer indication that there is something wrong in the workflows that the playwright tests are covered were working well and the changes he made leads to the tests become failed.

Yes, that makes sense to me beyond the PoC stage. However, for this initial stage, given that we dont really have real datapoints that the workflow wont produce false positives (this is one of the elements to validate), it feels that we should favour not getting in the way of the developer workflow.

I would consider in this poc stage to run it with something like continue-on-error https://github.com/weaveworks/weave-gitops-enterprise/pull/3595/files#diff-07e563e9e96c4e400b69036f9a4ac603dea520acbef2f83237c744ea2ef383e0R173

Then once we have passed the poc stage, to remove it.

Let me know your thoughts.

@enekofb Done, please check the last run

Copy link
Contributor

@enekofb enekofb left a comment

Choose a reason for hiding this comment

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

looks good, i think we just need to remove the need from smoke-test-results: to approve it

.github/workflows/deploy.yaml Outdated Show resolved Hide resolved
@taghreed86 taghreed86 requested a review from enekofb November 6, 2023 12:55
Copy link
Contributor

@enekofb enekofb left a comment

Choose a reason for hiding this comment

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

lets go!

@taghreed86 taghreed86 merged commit 92f1367 into main Nov 6, 2023
10 checks passed
@taghreed86 taghreed86 deleted the add_playwright_tests_job branch November 6, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from release notes Use this label to exclude a PR from the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants