onsi / ginkgo

A Modern Testing Framework for Go
http://onsi.github.io/ginkgo/
MIT License
8.29k stars 654 forks source link

Call dynamic variables through 2 test files. #1378

Open sushmithakongi opened 6 months ago

sushmithakongi commented 6 months ago

I have 2 test files to run and one has apis related to create and list related apis, and the other file has run apis. So when i do ginkgo test, i need to pass the variable holding the created ids from create api of one file to run api in another file. Hence i would run the ids which i created while testing.

onsi commented 6 months ago

hey - you cannot structure tests in this way. Ginkgo tests are independent so they can run in parallel and/or random order. This is documented extensively in the docs: https://onsi.github.io/ginkgo/