🎋Fixture

Details of the Fixture in Reports

What we store:

  • Fixture Name

  • Fixture Type

  • Related Test Entity

  • Result (if no error)

How is it stored

  • Table: EntityLogBase

  • Added as a Log for the test entity (INFO Type)

  • tagged with {"label":"fixture","desc":"A fixture provides a defined, reliable and consistent context for the tests"}

Query Executed:

select el.title, el.message, el.tags, sb.title, sb.suiteType 
from entitylogbase el 
join suitebase sb on el.entity_id = sb.suiteID
where sb.suiteType = 'TEST' or sb.suiteType = 'SUITE'

Sample Results:

title
message
tags
suiteType

test_needsfiles

tmp_path(scope: function) passed and it gave a result C:\Users\Rahul\AppData\Local\Temp\pytest-of-Rahul\pytest-2\test_needsfiles0

[{"label":"fixture","desc":"A fixture provides a defined, reliable and consistent context for the tests"},{"label":"function","desc":"Created anew for each test function."},{"label":"saved in","desc":"test_pytest_reporter\test_sample.py"}]

TEST

test_needsfiles

tmp_path_factory(scope: session) passed and it gave a result TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x00000251937F86D0>, _basetemp=WindowsPath('C:/Users/Rahul/AppData/Local/Temp/pytest-of-Rahul/pytest-2'), _retention_count=3, _retention_policy='all')

[{"label":"fixture","desc":"A fixture provides a defined, reliable and consistent context for the tests"},{"label":"session","desc":"Shared across all tests in the session."},{"label":"saved in","desc":"test_pytest_reporter"}]

TEST

test_needsfiles

sample_setup_3(scope: session) passed and it gave a result 9

[{"label":"fixture","desc":"A fixture provides a defined, reliable and consistent context for the tests"},{"label":"session","desc":"Shared across all tests in the session."},{"label":"saved in","desc":"test_pytest_reporter"}]

TEST

TODO

Last updated