pytest-xdist
pytest-xdist copied to clipboard
How Master node can know info from Worker nodes after call pytest_collection_modifyitems?
Hello everyone! I am using Terstrail plugin to report. So I need to know the list of test cases collected when calling pytest_collection_modifyitems on each node. Do you know how I can know this? Thanks.
Xdist only sends the nodes to the coordinator after modifyitems
Would the collection Reports come in handy
pytest_collection_modifyitems have workeroutput, but I not see in them in hook pytest_xdist_node_collection_finished
Xdist only sends the nodes to the coordinator after modifyitems
Would the collection Reports come in handy
could you explain more about what report you mean?
i did mean the collection reports, however i just took note, that those will not serialize the node details over the wire
without more details on your use-case i cant give a meaningfull answer
I need a list of testrail cases that was generated when pytest_collection_modifyitems was executed. After that I need to get this information from all nodes. and create a test run in testrail before push result
I need a list of testrail cases that was generated when pytest_collection_modifyitems was executed. After that I need to get this information from all nodes. and create a test run in testrail before push result
You should be able to use a hookwrapper for that.
@nicoddemus The question is not about writing a handler, but how to get the data after running the hook pytest_collection_modifyitems on each node to the master and execute something on the master after that and before running the tests.
See pytest_xdist_node_collection_finished
, I think you might be able to keep the nodeids for each work around, and then do something later once the collection finishes.