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...
  • 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.