Replies: 1 comment
-
Hi - nextest is process-per-test and this is a fundamental limitation with it: https://nexte.st/docs/design/how-it-works/ If you can serialize the state to disk one option is to use a setup script: https://nexte.st/docs/configuration/setup-scripts/ (As a general principle I would avoid modifying cached state across tests by the way, that can lead to strange problems down the line. Ideally each test is as isolated as possible. In your case it may make sense to combine the two tests into one.) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I would appreciate if somebody can explain me how to use a shared state in nextest ?
Here is some explanation.
My static state in /tests/common/config.rs
here is my integration_test.rs in /tests
Nextest.toml config:
cargo test --test integration_test -- --test_threads=1 --nocapture works well. I can initialize my static state in first test case, modify
conf
and use already initialized conf in next test case.Nextest somehow shows always "empty" initialized conf.
Beta Was this translation helpful? Give feedback.
All reactions