question

ronaldpringadi avatar image
ronaldpringadi asked amichaels commented

Server restart and continue testing

Lets assume I connect through an SSH session to a linux/unix server.

For some reason a server restart is needed as part of the automation, then continue testing.

How do I do this in Itest? Because once I issue a "command" restart, the session will be closed, right?

iTestsshsessionreboot
10 |950

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

1 Answer

·
udaya avatar image
udaya answered amichaels commented

yes, during interactive session , if you do a restart to the linux/dut environment and session terminates as the device restarts and closed all its active logins , but you can automate this feature in test cases and manage the flow with a login function call. Example of flow is

1. set the session id as a variable and in test case the session parameter replace with the variable.

2. Login to the device should a separate proc. Inputs would be the session id and device details.

3. Execute required commands

4. Say now you execute restart

i. sleep for few sec (may be the device will take little time )

ii. Go to step 2

5. Exit/Logoff - end of the test case

1 comment
10 |950

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

amichaels avatar image amichaels ♦ commented ·

I would suggest that rather than sleep, put an analysis rule on the second login that will retry when it fails. This way, you don't have to mess with figuring out how long to sleep.

0 Likes 0 ·

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.