Forum Discussion

dkasirajan's avatar
dkasirajan
Contributor
8 years ago
Solved

Is it possible to do all the testing using Keyword Script ? I am new to TestComplete

Is it possible to do all the testing using Keyword Script ? I am new to TestComplete. I am feeling very difficult with name mapping in keyword script. I am comfortable using python script and able to find object using find and Find Child method.

But in keyword if UI layout changes every time problem in name  mapping. IS there any way to do name mapping better in keyword script.

  • You can also sneak a little scripting in if you need to.  Use Run Code Snippet in your keyword tests for that:

     

  • Hi,

     

    >  I am feeling very difficult with name mapping in keyword script.

    https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ recording from https://support.smartbear.com/screencasts/testcomplete/ page might appear to be useful for you.

    As for pure Keyword testing: there is a reasonable chance that you will be able to have a basic control over your tested application with it. I.e.: start application, click menu options, feed data into most of controls. Most likely you will not be able to control more subtle things like accessing grid cells, intelligently wait until data appear in the control, if some window appears or not, etc. without scripting. Or, at least, without writing code snippets as already mentioned.

    And, obviously, while in general it is possible, but practical reusability of keyword tests/items is pretty low.

10 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    >  I am feeling very difficult with name mapping in keyword script.

    https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ recording from https://support.smartbear.com/screencasts/testcomplete/ page might appear to be useful for you.

    As for pure Keyword testing: there is a reasonable chance that you will be able to have a basic control over your tested application with it. I.e.: start application, click menu options, feed data into most of controls. Most likely you will not be able to control more subtle things like accessing grid cells, intelligently wait until data appear in the control, if some window appears or not, etc. without scripting. Or, at least, without writing code snippets as already mentioned.

    And, obviously, while in general it is possible, but practical reusability of keyword tests/items is pretty low.

    • Marsha_R's avatar
      Marsha_R
      Champion Level 3

      Most likely you will not be able to control more subtle things like accessing grid cells, intelligently wait until data appear in the control, if some window appears or not, etc. without scripting. Or, at least, without writing code snippets as already mentioned.

      And, obviously, while in general it is possible, but practical reusability of keyword tests/items is pretty low.

       

      AlexKaras you need to come hang out in our department for a while.  We do all those things in keyword tests and reuse a huge number of them.  :)

  • shankar_r's avatar
    shankar_r
    Community Hero

    I would say better way to handle descriptive is scripting not Keyword.

    • dkasirajan's avatar
      dkasirajan
      Contributor

      Thanks, I am also comfortable in Python scripting, but not able to convince manager. 

       

      his point is if you are able to do everything using keyword ,then why do u go for scripting.

      i am having big problem  in name mapping in key word script-.. here the objects uses absolute path and looking for whole hierarchy.  

       

      I could n't find any documentation related with name mapping how works in Keyword and Scripting. Pros and cons in both,

       

      I am expecting more detailed answer why scripting is better. Thanks.

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        We found that the tests usually run faster in script.  We took keyword tests and used the convert to script function and did a little cleanup and ended up with scripts that ran in almost half the time as they did previously.  

         

        Either keyword testing or script will read your name mapping.  The issue will be how the name mapping is set up in the first place.  You can still do a minimal name mapping and use FindChild in keyword testing.  Perhaps that is the way to go for now.