question

takabanana avatar image
takabanana asked takabanana posted

Opening session in a separate thread, for another thread?

Is there a way to open a session in a thread, and have another thread use that session?

 

I assume it would require setting the Session property value to a variable in the open action step of that session, and using that session variable in the 2nd thread?

I can't figure out how to do this - hoping i can?

 

Thanks for any help...

 

 

iTestsessionthreads
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

·
rbaswareddy avatar image
rbaswareddy answered rbaswareddy posted

Hi,

 

Could you please elaborate your issue in detail, so that we can try the scenario.

 

Thanks,

3 comments
10 |950

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

takabanana avatar image takabanana commented ·

Main Thread: Open Thread A

Main Thread: Wait for Thread A to Complete

Main Thread: Send command to SSH session created by Thread A

 

Thread A: Open SSH Session

 

 

 

0 Likes 0 ·
rmehlinger avatar image rmehlinger takabanana commented ·

Hi Takahito,

You'll want to give both your thread and your session a name, use the waitthread command in your main thread, and then send your command to the SSH Session. Attached is an example test case which should do what you want; you'll need to fill in your own test server details in the open command (1.2) under SSH Session Properties > SSH before it will work. Hope this helps!

 

Richard

0 Likes 0 ·
sshthreads3.fftc (3.6 KiB)
takabanana avatar image takabanana rmehlinger commented ·

Ah - 

 

I had put my ThreadA in a procedure that I call from the Main thread.

 

I did not think about "grouping" it under a comment, and making the comment "group" be ThreadA - which keeps the opened session name to be within the same context as the Main thread.

 

I will try that out!

 

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.