Ask a Question

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

SOLVED
kandy1984
Contributor

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 

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

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

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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

6 REPLIES 6
karkadil
Valued Contributor

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

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

kandy1984
Contributor

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

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
Valued Contributor

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

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

tristaanogre
Community Hero

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


@karkadil wrote:

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


While this is true, there is syntax that is similar between C#Script and C#... sure, not fully and some stuff is DEFINTELY not the same... but you'd be better off doing C#Script than, say Python, VBScript, or DelphiScript.  In a "past life", I coded automation in DelphiScript because a) I know Pascal syntax from previous training and b) I worked in a Delphi shop so knew I could get help from dev staff.

 

That said, I could just have easily written my automation in VBScript, JScript, or JavaScript without losing testing functionality.  Basically, whatever YOU are most comfortable with, that's the script language for you.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
AlexKaras
Community Hero

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

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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

kandy1984
Contributor

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

Thank you everyone for the replies. Me and my team have decided to stick with vb script as we have more experience and definitely comfortable scripting in that language.

cancel
Showing results for 
Search instead for 
Did you mean: