pytest_collection_finish_hook
This module contains the PytestCollectionFinish class which is used to handle the collection finish hook in Pytest.
PytestCollectionFinish
A class that handles the collection finish hook in Pytest.
Attributes:
Name | Type | Description |
---|---|---|
session_store |
SessionStore
|
The session store object. |
logger |
Logger
|
The logger object. |
file_handler_obj |
FileHandler
|
The file handler object. |
session |
Session
|
The session object. |
Methods:
Name | Description |
---|---|
__init_collection_finish |
Initializes the collection finish hook. |
collection_finish_hook |
The collection finish hook method. |
Source code in libs\cafex_core\src\cafex_core\utils\hooks_\pytest_collection_finish_hook.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
__init_collection_finish()
Initializes the collection finish hook by setting up the session store, logger, and file handler.
Source code in libs\cafex_core\src\cafex_core\utils\hooks_\pytest_collection_finish_hook.py
41 42 43 44 |
|
collection_finish_hook()
The collection finish hook method that is called at the end of the test collection.
It logs the collection finish event, retrieves the worker ID, gathers scenario details, creates a JSON file with collection details, and logs the collection details.
Source code in libs\cafex_core\src\cafex_core\utils\hooks_\pytest_collection_finish_hook.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|