Rayrun
← Back to Discord Forum

Share state/metadata between workers

Hey folks. I have created an auto fixture to run a python app before running tests but rather than tear down the child process in the auto fixture, I actually keep it running because i want to reuse the app when there are multiple tests in the same file. So we only clean up in subsequent fixture runs, if the test file is different.

This works really well but the downside is I have a bunch of hanging processes when the tests finish. I'd like to clean these up in a globalTeardown script but I don't have access to the pids. Is there a way to store save some 'global metadata' or something from the worker to the main process? Or is there another way I can teardown without needing to restart the same process for different tests in the same file?

Thanks!

For reference, I'm running playwright in node.

This thread is trying to answer question "Is there a way to store global metadata or another way to teardown without needing to restart the same process for different tests in the same file?"

0 replies
TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].