> For the complete documentation index, see [llms.txt](https://rahuls-organization-17.gitbook.io/handshake/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rahuls-organization-17.gitbook.io/handshake/help-docs/pytest/how-does/fixture.md).

# 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:&#x20;

```sql
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

* [ ] export these details in an excel report
* [ ] export these details in html report
