Forum Discussion
- nmrao
Champion Level 2
The general and best approach, IMO, is that each test should be independent. Not clubbed or not to have dependency on previous tests.
May be you wanted to reconsider how the tests are desinged?
- erikmollerbergNew ContributorHi,
Thank you for your answer.
The thing is that this is a key api that I am testning.
The first test is to create a key. The response body returns a api key for a specific method.
next test to set a new profil for The key and so on.
In this case it I want to take The response body key from test1 and use in test 2.
how to do this ?- nmrao
Champion Level 2
Thats what I was exactly saying. Either have the step to get the key in the same test case as a test step. Or use it as pre-requisite(you use Events for the same) before starting execution of test cases i.e., get the key and store it in suite level and that should not actually be a test case as you say.