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

🐛e2e testing: replacement of sleepers using Playwright (preparation for upscaling of ext clusters) #5167

Merged
merged 36 commits into from
Dec 18, 2023

Conversation

sanderegg
Copy link
Member

@sanderegg sanderegg commented Dec 13, 2023

What do these changes do?

This PR leverages Playwright and replaces the puppeteer-based sleepers e2e test by:

  • not relying on any template, but by creating a new project from a service
  • creating 12 sleepers
  • running them both in billable and non-billable products works

Bonuses:

  • refactored some fixtures (auto-stop started pipeline on exit, auto-delete created project on exit)
  • uses the GUI to logout
  • some fail fast with error added (wrong password or others that do not need to wait 30 seconds to fail)
  • make use of socket.io messages to wait for events
  • can auto-register on deploys that allow it
  • uses pydantic 2.x

NOTE: The video was generated using Playwright --video=on flag!

8e7e530c20a3bf0e8bc7d91e73f4a0a6.webm

Related issue/s

How to test

against any deployment

make devenv
source .venv/bin/activate
cd tests/e2e-playwright
make install-dev
# if non billable with existing user
pytest test/sleepers.py --product-url=https://osparc.io --user-name=USERNAME --password=PASSWORD
# if billable with existing user
pytest test/sleepers.py --product-url=https://osparc.io --user-name=USERNAME --password=PASSWORD --product-billable
# autoregister works, non-billable
pytest test/sleepers.py --product-url=http://127.0.0.1:9081 --autoregister
# autoregister works, billable
pytest test/sleepers.py --product-url=http://127.0.0.1:9081 --autoregister --product-billable

against local deployment only

make devenv
source .venv/bin/activate
make build up-prod
cd tests/e2e-playwright
make install-dev
make test-sleepers
# or headed
make test-sleepers-dev

Dev Checklist

DevOps Checklist

@sanderegg sanderegg added the a:autoscaling autoscaling service in simcore's stack label Dec 13, 2023
@sanderegg sanderegg added this to the Kobayashi Maru milestone Dec 13, 2023
@sanderegg sanderegg self-assigned this Dec 13, 2023
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Merging #5167 (6f9aa3c) into master (bda5bc6) will increase coverage by 0.1%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

❗ Current head 6f9aa3c differs from pull request most recent head f1e5fcc. Consider uploading reports for the commit f1e5fcc to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #5167     +/-   ##
========================================
+ Coverage    87.2%   87.4%   +0.1%     
========================================
  Files        1282    1282             
  Lines       52651   52651             
  Branches     1141    1141             
========================================
+ Hits        45946   46022     +76     
+ Misses       6460    6384     -76     
  Partials      245     245             
Flag Coverage Δ
integrationtests 64.9% <ø> (+1.3%) ⬆️
unittests 85.2% <ø> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 10 files with indirect coverage changes

@sanderegg sanderegg force-pushed the comp-backend/upscaling branch 3 times, most recently from 84e5516 to b8ef9da Compare December 15, 2023 13:58
@sanderegg sanderegg changed the title 🐛Computational backend: upscaling of workers 🐛e2e testing: replacement of sleepers using Playwright (preparation for upscaling of ext clusters) Dec 15, 2023
@sanderegg sanderegg marked this pull request as ready for review December 15, 2023 15:42
Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Super cool!
Looks good to me. I added a few suggestions and questions for my own understanding.
Thanks!

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

Looking very nice. Thanks for the effort!

tests/e2e-playwright/tests/conftest.py Show resolved Hide resolved
tests/e2e-playwright/tests/conftest.py Show resolved Hide resolved
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

@sanderegg An additional question
I see in the above video that not all the sleepers show any outputs. Is that intended?

tests/e2e-playwright/Makefile Show resolved Hide resolved
@sanderegg sanderegg merged commit 5c8ee00 into ITISFoundation:master Dec 18, 2023
@sanderegg sanderegg deleted the comp-backend/upscaling branch December 18, 2023 09:36
Copy link

sonarcloud bot commented Dec 18, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

jsaq007 pushed a commit to jsaq007/osparc-simcore that referenced this pull request Dec 18, 2023
@sanderegg sanderegg added the t:maintenance Some planned maintenance work label Dec 22, 2023
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jan 8, 2024
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:autoscaling autoscaling service in simcore's stack t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants