You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Case: I need to collect custom data from tests while parallel running and then I need to use that.
The way I did, I tried to store and collect data in the static object but while parallel running it creates a new static object for each worker anyway, I've tried to use setup, teardown methods, global setup/teardown methods, but still couldn't resolve the issue.
Steps to Reproduce
Create a few tests async tests (10 parallel tests) for 4 workers, and try to collect generated random numbers in each test to global object or file.
Expect:
The global tear-down setup methods can access in-memory values.
Or to have a container for data between workers
Actual:
Global teardown/setup methods don't have access to in-memory (test) values.
It's impossible to share or collect data between workers
The text was updated successfully, but these errors were encountered:
NazarYermolenko
changed the title
Couldn't store data in for global purposes while parallel running
Couldn't store data for global purposes while parallel running
Oct 14, 2021
As the workers are separate child processes there's no easy way to send data back to the main process. My recommendation is to have each worker/test write to a temporary file and then read that file at the end of the tests.
Description
Case: I need to collect custom data from tests while parallel running and then I need to use that.
The way I did, I tried to store and collect data in the static object but while parallel running it creates a new static object for each worker anyway, I've tried to use setup, teardown methods, global setup/teardown methods, but still couldn't resolve the issue.
Steps to Reproduce
Create a few tests async tests (10 parallel tests) for 4 workers, and try to collect generated random numbers in each test to global object or file.
Expect:
The global tear-down setup methods can access in-memory values.
Or to have a container for data between workers
Actual:
Global teardown/setup methods don't have access to in-memory (test) values.
It's impossible to share or collect data between workers
The text was updated successfully, but these errors were encountered: