Calling another QC inside a QC, got $session doesn't exist error
Hi, I'm trying to call another QC A inside a QC B, but during execution I saw '$session doesn't exist error' at the point to run the step calling QC B. The $session is effective in QC B. So my question is: what is the best practice for this kind of situation? It seems that iTest will make the session handle effective automatically into QC, however it doesn't for the scenario QC calling QC. Any idea?
If we are calling a quick call within a quick call we need to pass session id as a argument. Steps to achieve this: - Declare the session id as a global variable in main testcase![alt text] - Pass that global variable as a argument in the quick call ![alt text] : /storage/temp/3938-main_testcase.png : /storage/temp/3940-quick_call.png
Hi Penn, When calling QC A inside QC B, make sure that we are passing the the session handle of QC B to QC A. As we do this iTest will take the same session handle for both quick calls. In below image I created two QCs 1. Commands and 2. Login. I called Login QC under commands and passed the commands session handle arguement to Login such that iTest will use the same ID for both. ![alt text] Then called commands QC in main test case and passed main session handle to commands QC. ![alt text] : /storage/temp/3941-quick_call.jpg : /storage/temp/3942-main_tc.jpg Hope this resolves your query !! Regards, Venkat