Forum Discussion

sudhir_optima's avatar
sudhir_optima
Contributor
13 years ago

Difference between calling Run ScriptRoutine and Run Test

Can any one tell me Difference between calling Run ScriptRoutine and Run Test. I know We can call the script function in Keyword test as Run ScriptRoutine. But how the Run Test works.



I am exploring a Project my client want to work on. They has create a test ( test1)which call some function.

Now they are calling this Test in another Test (test2)



Run Test          'test1'             'some value'



When i open this test ( test1), and observe that  Run Test is disable. I can not Run this test.



But it this scuuessfully run from test2. Why i can not run the individual test1 ?


5 Replies

  • Hi,


    You cannot execute a test by using the Run Test command if this test has parameters that do not have default values specified. So, before running the test, you need to specify the parameters default values.

  • Then what is the purpose of calling the Test instead calling the function.

    I am exploring one project my client want to continue . They have developed a below function



    Function DimViewGridPopupMenu (columnName,PopMenuPath)



    They had seprately created a test (_embeded_01) calling the function as



    Item                                          Operation                                                             Value



    RunScriptRoutine                  DimViewGridPopupMenu                              Column Name,"[2]"



    Now in another Test, they are calling above test (_embeded_01) as below



    Item                                           Operation                                                             Value



    Run test                                      _embeded_01                                        "Revenue"



    I dont understand why they are calling the  DimViewGridPopupMenu  as a Test instead of ScriptRoutine Function ? 



    I tried to call directly as Function defining the variable but it does not work ? 



    What is the reason ? Is it Test complete's feature or limitation ? 






  • Hi,


    Please provide us with the following information:


    1. What do you mean by "ScriptRoutine Function"? Is it the Run Script Routine operation?


    2. Send us the code of the script functions you have and screenshots of all the keyword tests. Also, go to the Parameters page of each keyword test and send us its screenshot.


    3. Describe what you try doing step by step.

  • 1.       Yes Its Run ScriptRoutine operation.


     

    2.       Function Code with screen shot ( DimViewGridHeaderPopup)


     

    They have create a test with this function as (Embedded test). See the Run test option is disable.


    Alos find the screen shot for the parameter page for this test ( Parameter page for embedded test)


    3.       They are calling the Embedded test in another test . Find the attachment (Keyword Test calling the Embedded test)


    So my question is why they are calling the DimViewGridHeaderPopup function as test and not as Script Routine ?

  • Hi,


    As far as I can see, your developers created the keyword test (_embedded_03_03_21) that calls the DimViewGridHeaderPopMenu function using the Run Script Routine operation. Then (I guess), they create a parameter for this test. To view this parameter, go to the Parameters page (open the Keyword Test editor and switch to the Parameters tab).


    Then, they call the _embedded_03_03_21 test from dim_view_01 test and use this parameter. But I don't understand how they use this parameter in the _embedded_03_03_21 test. It seems the developers just created this parameter and forgot to create the operation in the _embedded_03_03_21 test that will use it.


    Currently, to run the DimViewGridHeaderPopup function, you can use the _embedded_03_03_21 test, but before do this:


    1. Go to the Parameters page of the keyword test editor (not to the Operation Parameters dialog).

    2. Enable the Optional check boxes for the columnName and popMenuPath parameters.

    3. Specify the default parameter values in the Default Value column.


    After that, the Run Test button will be available for the _embedded_03_03_21 test.