Forum Discussion

tristaanogre's avatar
tristaanogre
Esteemed Contributor
7 years ago

Script Extensions

This is just a few brief questions to start discussion.  shankar_r recently posted a framework he built in a script extension.  There was another discussion yesterday to debug a script extension problem.  As you can see in my signature, I use them a lot and do some development on the side.  Most of the framework I'm using currently in my employment is built into an extension.

 

This is a pretty powerful feature of TestComplete and I think it can be leveraged for a lot of benefit in automation environments.  I think, also, this is an opportunity for sharing of code and resources in a format that is easily dropped in to any project, regardless of initial source base.  I can conceive of a collaborative effort to build a library of extensions that would be universally useful for many TestComplete users.  To that aim...:

 

So... the question:

 

  1. Who else uses script extensions in their automation structure?
  2. What roles do script extensions play in your automation development?
  3. What kinds of things would you like to see script extensions be able to do that they don't already do?
  4. Do you have any extensions that you think would be of universal use that you'd like to have hosted?

9 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    I would say, what ever the function which we are mentioning or called as a COMMON  that can be changed to a Powerful Script Extension. 

     

    Some scenarios I'm using Script Extensions,

     

    Scenario #1:

     

    I use DDT driver to read the data from excel then store those stuffs in a Project variable. In each cell i will values like below,

     

    userNames=tester,devloper,customer

    roles=role1,role2,role3

     

    For getting the list of userNames in a array i created a function which will return [tester,devloper,customer] array and few more options i want to have.

     

    In this case, I created Script Extension that will return me the array values if i input the cell value and what property i want.

     

    Scenario #2:

     

    Its very simple and basic, I want to convert the String to Integer value for this i can use Test Complte inbuild method aqConvert.StrtoInt.

     

    But when you input value as "test" then aqConvert.StrtoInt will thrown an error as Can't convert value.

     

    So, I created a custom function Log an error instead Error popup. For this i can created script extension,

     

    And same kind of different scenarios i have been using Script Extension.

     

    For all this starting point is tristaanogre session on Script Extensions :)

     

     

    • Marsha_R's avatar
      Marsha_R
      Champion Level 3

      Could somebody fix that script extension that won the contest that lets you import/export the variable list?  There was supposed to be an update that I needed to get it to run and the author disappeared.  :(