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

🔨 Enhance diagnostics info in e2e testing #5962

Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Jun 19, 2024

What do these changes do?

This PR does some changes in the e2e-playwritght tests

  • adds test report on failures that includes graylog URL within the time interval of the test. This will aid to diagnostic the state of the backend
  • renames e2e-playwright tests to follow naming convention

Related issue/s

  • e2e maintenance

How to test

This is how it would display in case of failure

platform linux -- Python 3.10.13, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/crespo/repos/sandbox-python/test_pytest
plugins: asyncio-0.23.7
asyncio: mode=strict
collected 1 item                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

test_it.py 
Diagnostics for test_it:
   test_name : test_it
   test_location : ('test_it.py', 0, 'test_it')
   api_host : https://api.osparc.io
   graylog_url : https://monitoring.osparc.io/graylog/search?from=2024-06-19T09:58:42.978364Z&to=2024-06-19T09:58:42.989394Z
F                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [100%]

================================================================================================================================================================================================================================================== FAILURES ===================================================================================================================================================================================================================================================
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ test_it ___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    def test_it():
    
        print("foo")
>       assert False
E       assert False

test_it.py:4: AssertionError
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
foo
=========================================================================================================================================================================================================================================== short test summary info ===========================================================================================================================================================================================================================================
FAILED test_it.py::test_it - assert False

Dev-ops checklist

None

@pcrespov pcrespov added e2e Bugs found by or related to the end-2-end testing t:maintenance Some planned maintenance work labels Jun 19, 2024
@pcrespov pcrespov added this to the South Island Iced Tea milestone Jun 19, 2024
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.9%. Comparing base (cafbf96) to head (15b0946).
Report is 285 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5962      +/-   ##
=========================================
- Coverage    84.5%   62.9%   -21.6%     
=========================================
  Files          10     462     +452     
  Lines         214   23584   +23370     
  Branches       25       0      -25     
=========================================
+ Hits          181   14856   +14675     
- Misses         23    8728    +8705     
+ Partials       10       0      -10     
Flag Coverage Δ
integrationtests 62.9% <ø> (?)
unittests ?

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

see 472 files with indirect coverage changes

@pcrespov pcrespov self-assigned this Jun 19, 2024
@pcrespov pcrespov force-pushed the mai/e2e-hook-to-log-grayloglinks branch from ba583f8 to 104e365 Compare June 19, 2024 15:38
@pcrespov pcrespov marked this pull request as ready for review June 19, 2024 20:05
@pcrespov pcrespov enabled auto-merge (squash) June 19, 2024 20:07
tests/e2e-playwright/tests/conftest.py Outdated Show resolved Hide resolved
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

very nice and simple addition.

Question: will it print it on failure only? and when? at the end or at the beginning of the logs? or both?

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

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

merci

@pcrespov pcrespov force-pushed the mai/e2e-hook-to-log-grayloglinks branch from 104e365 to 15b0946 Compare June 20, 2024 09:25
@pcrespov
Copy link
Member Author

Question: will it print it on failure only? and when? at the end or at the beginning of the logs? or both?
@sanderegg in the description I show an example of how it prints. It does it on failure only and just after the definition and before the failure reported.

@pcrespov pcrespov disabled auto-merge June 20, 2024 09:57
@pcrespov pcrespov merged commit b136bac into ITISFoundation:master Jun 20, 2024
50 of 54 checks passed
@pcrespov pcrespov deleted the mai/e2e-hook-to-log-grayloglinks branch June 20, 2024 09:57
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jul 5, 2024
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants