Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Dec 2, 2020

What do these changes do?

After the informative presentation by @odeimaiz about end-to-end testing, I felt that during the testing there was little information about the backend state. Then, I thought it might be good to have a way to get a direct link to the backend logs at a give time.

This implements a simple utility function to build links to graylog with a given time spam. Then, this function is used to build a log message next to every call to screenshot that will allow the tester to analyze the backend state corresponding to every front-end screenshot

Added some extra doc.

Related issue number

How to test

Following the instructions of the presentation, we can run a tutorial and see the Backend Snapshot: ... link next to the screenshot

$ cd tests/e2e
$ npm install --save
$ node tutorials/sleepers.js https://osparc-master.speag.com/ puppeteer@itis.testing ******* 
[2020-12-03T09:16:36.020Z] Screenshots directory: /home/crespo/devp/osparc-simcore/tests/e2e/screenshots/
[2020-12-03T09:16:36.257Z] Opening https://osparc-master.speag.com/
[2020-12-03T09:16:36.899Z] Backend Snapshot:  https://monitoring.osparc-master.speag.com/graylog/search?q=image_name%3Aitisfoundation%2A&rangetype=absolute&from=2020-12-03T09%3A16%3A06.899Z&to=2020-12-03T09%3A16%3A36.899Z
[2020-12-03T09:16:36.900Z] /home/crespo/devp/osparc-simcore/tests/e2e/screenshots/10-16-36_Sleepers_landingPage_osparc-master.speag.com.jpg
...

Checklist

  • Did you change any service's API? Then make sure to bundle document and upgrade version (make openapi-specs, git commit ... and then make version-*)
  • Unit tests for the changes exist
  • Runs in the swarm
  • Documentation reflects the changes
  • New module? Add your github username to .github/CODEOWNERS

@pcrespov pcrespov marked this pull request as draft December 2, 2020 16:10
@codecov
Copy link

codecov bot commented Dec 2, 2020

Codecov Report

Merging #2015 (1ff0e1d) into master (d3830fc) will increase coverage by 3.2%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #2015     +/-   ##
========================================
+ Coverage    70.4%   73.7%   +3.2%     
========================================
  Files         390     390             
  Lines       14346   14346             
  Branches     1441    1441             
========================================
+ Hits        10109   10579    +470     
+ Misses       3885    3382    -503     
- Partials      352     385     +33     
Flag Coverage Δ
integrationtests 63.1% <ø> (-13.0%) ⬇️
unittests 67.7% <ø> (ø)

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

Impacted Files Coverage Δ
...re_service_webserver/projects/projects_handlers.py 89.8% <0.0%> (+0.3%) ⬆️
.../simcore_service_webserver/projects/projects_db.py 84.4% <0.0%> (+1.9%) ⬆️
...server/src/simcore_service_webserver/groups_api.py 89.3% <0.0%> (+2.5%) ⬆️
.../server/src/simcore_service_webserver/users_api.py 93.9% <0.0%> (+2.6%) ⬆️
...r/src/simcore_service_webserver/director/config.py 93.1% <0.0%> (+3.4%) ⬆️
...er/src/simcore_service_webserver/catalog_config.py 100.0% <0.0%> (+4.0%) ⬆️
...es/sidecar/src/simcore_service_sidecar/rabbitmq.py 89.7% <0.0%> (+4.4%) ⬆️
...eb/server/src/simcore_service_webserver/catalog.py 76.0% <0.0%> (+5.3%) ⬆️
...erver/src/simcore_service_webserver/director_v2.py 85.8% <0.0%> (+6.1%) ⬆️
.../sidecar/src/simcore_service_sidecar/log_parser.py 81.8% <0.0%> (+16.8%) ⬆️
... and 15 more

@pcrespov pcrespov added a:infra+ops maintenance of infrastructure or operations (discussed in retro) e2e Bugs found by or related to the end-2-end testing t:maintenance Some planned maintenance work labels Dec 3, 2020
@pcrespov pcrespov changed the title Adding snapshot in graylog Adding snapshot link to graylog with every call to screenshots Dec 3, 2020
@pcrespov pcrespov marked this pull request as ready for review December 3, 2020 09:20
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.

thanks for this!

Copy link
Contributor

@ignapas ignapas left a comment

Choose a reason for hiding this comment

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

Nice :) only a couple of comments... and that annoying linter of yours!

pcrespov and others added 2 commits December 3, 2020 12:11
Co-authored-by: Odei Maiz <33152403+odeimaiz@users.noreply.github.com>
@pcrespov pcrespov requested a review from ignapas December 3, 2020 14:08
@pcrespov pcrespov merged commit 5b01a28 into ITISFoundation:master Dec 3, 2020
@pcrespov pcrespov deleted the enh/e2e-dumps-graylog-link branch December 3, 2020 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:infra+ops maintenance of infrastructure or operations (discussed in retro) e2e Bugs found by or related to the end-2-end testing t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants