Forum Discussion

thustead's avatar
thustead
Contributor
14 years ago

Picking a scripting language

I mentioned this in a post the other day, but I want to post the question by itself.  I would like some guidance on which scripting language I should use for my TestComplete projects.  Obviously the different options help when someone has experience in one language or another, but I have never been a developer, I have used QTP and TestPartner, both are VB based, but I never got into heavy scripting, so I don't have a preference towards VBScript, or any of the others.  I would like to use the most widely used language by TC users, providing a larger support community, and I know the Falafel scripting classes focus on Jscript, so I'm leaning towards this one, but would like some feedback.



I also have a question regarding getting scripting training.  The description for JScript in TC says that its "Java-like .. (similar to the C++ and C# syntax)", so what type of classes or books should I look for?  My new company does provide tuition assistanse, so I'd like to get some good scripting training, but I'm not sure if Java development type training would work here or not, could someone with some development and TC experience provide some guidance?



Thanks,

Tom
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    The only time that script language makes a difference is if you're going to be creating what are called "Connected Applications" where TestComplete script routines/code is called from within the application under test.  In those cases, the script language you use should be the same as the application under test.



    If you're not creating Connected Applications, then the only criteria that I would say would make a difference in scripting language is personal familiarity.  If you're familiar with VB, then VBScript would probably be easiest for you to pick up.  If you're a Java guy, then go with JScript.  I personally know Delphi/Pascal very well so that's my primary default but I'm teaching myself JScript as I go simply to expand my ability to assist others in different languages.
  • Thanks for the quick reply Robert!



    Yea, I don't think we will be creating Connected Applications.  My VB experience is mainly using QTP to test a Siebel app and the scripts looked a lot different than what I've seen when doing VBScripts in TC against our C# application, so I'm leaning towards JScript myself, mainly because it seems like the most widely used language by the TC user community.  You mentioned that you were learning JScript yourself to help others, so do you think this is correct that its the most widely used language by TestComplete users?



    Any advice on the types of books or training classes that I should look for?  I just started a JavaScript CBT, but a few slides in I found out that JScript is a slightly different language, so I'm a little lost on where to look to learn it.



    Thanks again,

    Tom
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    I really can't attest to which language is the most widely used in the TC community.  Certainly there's a lot out there documented in JScript, but I've seen people post questions about DelphiScript, VBScript, and others, so it's a pretty wide range of experiences.  Of course, with Keyword Testing, scripting language is no longer really a HUGE concern (although using Code Snippets and Code Expressions require a little bit of knowledge).



    While JavaScript and JScript are essentially two different things, the syntaxes are close enough, I think, that if you learn one, you should be able to use the other with minimal re-orientation required.



    As for books and/or classes, that I'll leave to someone else to supply.  For me, when I need resource on how to code something, that's when I crack open the "Google" search and see what I can find. 
  • Thanks again Robert!



    This is very helpfful.  I may go with VBSript, since its used in QTP.  I have many years of testing experince, so improving my VB scripting knowledge would build upon this and help if I ever find myself using QTP again.



    Tom