cancel
Showing results for 
Search instead for 
Did you mean: 

Which script language do you prefer and why?

SOLVED
Highlighted
New Contributor

Which script language do you prefer and why?

I apologize if this topic has been discussed before but I wasn't able to find what I was looking for in what is out there at the moment. 

 

Our team currently uses VBScript but it has been in discussion for the past couple years that we should move to something else. Currently our top two choices are between Python and Javascript. No one really has a preference because both are languages that no one has really used much on our team. Either way we will all have to get some training and learn the language but I was just curious if anyone had any opinion on what they found to be "better". Obviously some people will have their preference but I was just wondering if anyone can share their opinion and experience. 

 

Thank you and have a great day!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Hero

Re: Which script language do you prefer and why?

I personally use JavaScript because it's a very well known, easy to get into language, with A LOT of online documentation for syntax and tricks.


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

View solution in original post

Community Hero

Re: Which script language do you prefer and why?

Hi,

 

In a nutshell:

VBscript :

-- Pretty inconvenient runtime error handling. This makes VBScript almost unusable for web services testing;

-- Does not support optional/default parameters. This complicates evolution of the library code (it is not possible to add optional parameter to the function that (parameter) gets non-default value only once or not often);

-- Does not support short-circuit logical operations. (For example, the following condition will cause runtime error if the tested object does not exist: IF (obj.Exists AND obj.Visible) Then... )

 

JScript/JavaScript/C#Script/C++Script:

-- Does not support 'out' parameters (or parameters passed by reference). This forces return of JSON structure when more than one value must be returned. Also this makes it not possible to call some Win32 API functions and COM methods;

-- Native Java arrays must be converted before they can be used in test code as parameters for the methods provided by TestComplete/COM.

 

Python:

-- The language does not contain clauses to enclose if/loop/etc. structures. Thus it is not possible to restore code logic if for some reason indentation is broken. Very risky, as for me.

 

P.S. [Whispering] My personal preference is DelphiScript, but too few people nowadays know what is this...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

3 REPLIES 3
Community Hero

Re: Which script language do you prefer and why?

I personally use JavaScript because it's a very well known, easy to get into language, with A LOT of online documentation for syntax and tricks.


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

View solution in original post

Community Hero

Re: Which script language do you prefer and why?

Hi,

 

In a nutshell:

VBscript :

-- Pretty inconvenient runtime error handling. This makes VBScript almost unusable for web services testing;

-- Does not support optional/default parameters. This complicates evolution of the library code (it is not possible to add optional parameter to the function that (parameter) gets non-default value only once or not often);

-- Does not support short-circuit logical operations. (For example, the following condition will cause runtime error if the tested object does not exist: IF (obj.Exists AND obj.Visible) Then... )

 

JScript/JavaScript/C#Script/C++Script:

-- Does not support 'out' parameters (or parameters passed by reference). This forces return of JSON structure when more than one value must be returned. Also this makes it not possible to call some Win32 API functions and COM methods;

-- Native Java arrays must be converted before they can be used in test code as parameters for the methods provided by TestComplete/COM.

 

Python:

-- The language does not contain clauses to enclose if/loop/etc. structures. Thus it is not possible to restore code logic if for some reason indentation is broken. Very risky, as for me.

 

P.S. [Whispering] My personal preference is DelphiScript, but too few people nowadays know what is this...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

Valued Contributor

Re: Which script language do you prefer and why?

My personal experince is started with VBScripts since had worked with QTP.

Then moved to jscript (TC didn't had javascript support untill later.....) and resencetly experiment with python.

I find python is my preferable if I was given choice.