Forum Discussion

kandy1984's avatar
kandy1984
Contributor
6 years ago
Solved

Suggestion to choose a scripting language as application is developed in C#

Hi.

I am in a bit of a confusion of what scritping language should i use to test the new desktop application. It is developed in C#.  Could someone give me suggestion on the scripting language that i can choose from?

 

Thanks for the help.

Sudha 

  • AlexKaras's avatar
    AlexKaras
    6 years ago

    Hi,

     

    Well... Just my $0.02:

    My personal rating:

    1) DelphiScript;

    2) JScript / JavaScript (with C++/C# script flavors that can be mixed with pure JScript code);

    3) VBScript;

    4) Python.

     

    Inconveniences:

    -- DelphiScript: a) at least first parameter of the function cannot be optional; b) DelphiScript code cannot be moved to Script Extension and must be rewritten; c) not a lot of guys nowadays know what Pascal word means;

    -- JScript: a) does not support parameters passed by reference (this makes it not possible to call some Win32/COM functions and complicates data exchange); b) custom internal format for arrays (not a showstopper in any way, but one must remember about this);

    -- VBscript: a) does not have exceptions handling (this creates significant problems for Web Services tests and sometimes for the 'regular' code too); b) does not support optional parameters;

    -- Python: a) code execution flow depends on indentation and there are no means to restore initial indentation if it is lost for some reason (i.e. code logic can be unrecoverably lost); b) test code cannot be moved to Script Extension and must be rewritten.

     

    A strong side of JScript is the built-in support of regular expressions and JSON that simplifies code development quite often.

     

    And yes, one must remember and consider the knowledge and experience of those who will develop and support test code.

     

6 Replies

  • karkadil's avatar
    karkadil
    Valued Contributor

    Scripting language doesn't depend on the language of your tested application. You are free to use any available language

    • kandy1984's avatar
      kandy1984
      Contributor

      Thank you Gennadiy Alpaev. I was thinking also if i choose C# scripting language (even though its different to C#) would be beneficial for me to ask help from the dev-team if i get stuck when scripting. However, it looks like TC does not support C# scripting language. In this case, any suggestion to choose a scripting language in this situation?

       

      Thanks for helping,

      Sudha

      • karkadil's avatar
        karkadil
        Valued Contributor

        C#Script is basically JScript, so C# developers will not be able to help you