question

hyao123 avatar image
hyao123 asked ericnute converted comment to answer

How test cases in one test suite know and reuse session opened in setup test ?

I would like to make one test suite working as follows. > **setup.fftc:** this will open one session s1 and run some setup (this will take long time,so I don't want to run this in each test case) > > **test cases:** t1.fftc, t2.fftc,t3.fftc (will run on session s1) > > **cleanup.fftc:** clean up and close session s1 however, commands in t1-t3 and cleanup cases can't know session s1, any way can help solve this?
iTestsession
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rkomitla avatar image
rkomitla answered ericnute converted comment to answer

Either you open and close this session each of your testcase or make your invidual tests as part of procedures such that the setup and cleanup procedures can be called as part of your other tests too.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KumarS avatar image
KumarS answered ericnute converted comment to answer

Sessions cannot be preserved across testcase runs. So you have to do as Anku suggested - open the session again in each testcase.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ankugarg avatar image
ankugarg answered ericnute converted comment to answer

Why don't you open and close session s1 during in setup test case.Then in every testcase you can open and close session s1.In every test case you will have to put s1 in the session field in every command.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.