Would you like to write QTP scripts in Java/Ruby/Python instead of VBScript?
I'm currently working on a framework that let you write QTP test scripts in Ruby instead of VBScript. At the core of this framework is a small VBScript program that puts QTP in "awaiting commands" mode. Once started, I can easily choose what QTP objects to expose (JavaWindow, Browser, TextBox, etc.) and call any method they have. I can even call custom VBScript functions that I wrote for my old framework. I run the Ruby side of the framework on JRuby (Ruby on the JVM) so it has access to Java classes as well. The main benefits of using this framework are:
1. You can use a real object oriented language to develop your scripts.
2. You can code and debug your test scripts in Eclipse.
3. Integration possibilities are almost limitless since you're running on a JVM.
I used it already for some fairly large project and it's holding up pretty well. With a bit of work, it could be adapted to support other JVM enabled language such Java and Python (through Jython). My questions are:
1. Would you use something like this at work?
2. Do you think your employer would actually buy something like this?
Any insight would be appreciated. Thanks!
That's nice and all, but why not just use Selenium for free then? The thing holding most folks back from Selenium is inexperience with Java/Ruby/Python.
Last edited by NoUse4aName; 06-11-2013 at 04:32 PM.
What if you aren't testing a web application?
Also, in my experience, Ruby and Python are as easy to use as VBScript and way more powerfull. Plus, the tool set available for these languages is far superior.
Have you used this for a while? Is it doing things better/faster than regular QTP and VBScirpt?
@Kevin: I've been using this for more than a year now and I would say it definitively made my test automator life easier. It certainly made my scripts easier to maintain because I can use a real object oriented programming. Inheritance and polymorphism allow you significantly improve your code's structure if you know how to use them.
Also, the ability to integrate with existing Java based tools makes solving complex problems much faster. For example, one of the applications I'm testing is a Swing/Win32/Web hybrid. QTP is unable to see through many of the application's windows. We still wanted to use QTP because it worked well with many windows but we needed another tool for the rest. We decided to use Sikuli. Since it's a Java based tool, it was really easy to integrate with our framework. QTP and Sikuli are now working together to automate even the most complex applications. Integrating Sikuli with VBScript would have required quite a few of dirty hacks.
Another advantage is the toolset available for Ruby/Java/Python. Eclipse and NetBeans are MUCH better development environments than QTP. They provide refactoring, intellisense for custom classes, integration with source control systems, snippets, advanced debuggers, code review tools, etc.
Also, as a bonus, you get natural obfuscation of your test code. Let's say you wrote some reusable test script that you want to sell to your client. You don't necessarily want them to see your code and play around with it. There are VBScript obfuscators available but they're pretty easy to crack. Byte code compilation is harder to crack and more elegant.
To get back to your questions:
1. If I was still actively writing tests for QTP I would personally be interested.
2. I can't see management buying into this for a purchase. You might have the programming background to take advantage, but management would see it as a risk to tie their QTP code to java when most potential applicants for qtp only have vbs experience. If you're lucky anyway, been doing interviews lately and still shocked how many have only done a little record and replay but rate themselves a 4/5 on qtp ability.
Last edited by NoUse4aName; 06-12-2013 at 10:05 AM.
@NoUse4aName: In my area, peoples who know QTP/VBScript seem to be a rarity. There are, however, tons of Java developers. Also, in my experience, Java developers are better at test automation than the average QTP "expert". They don't apply for test automation jobs because they don't want to use VBScript. Changing the job requirement from VBScript to Java could actually be an advantage from a staffing perspective since it would help attract developers to the test automation field.
Connectivity to Quality Center would be something I would like to see.
Patience is like bread I say.... I ran out of that yesterday.
I don't think it's the language that's keeping devs from wanting to do test automation. A good one would have unit testing and api testing under his belt and not see a need for a tool like QTP anyway.
Originally Posted by evilTwin
You're looking at a very limited market. Someone willing to pay java developer salaries for automation, plus willing to pay the high QTP license costs, plus still uses a stand alone app(or some other factor blocking use of Selenium), etc. It would be an interesting learning experience to produce and put out on the market for sure, I just wouldn't expect to get much back for your time.
@gencke: Quality Center connectivity is fully functional. It works exactly as if you were running a standard QTP script.
@NoUse4aName: As an automation consultant, I usually get better hourly rates than my Java developing colleagues. My clients are usually big corporations. They invest millions in QTP and QC licences and expect maximum return for their money. If I can demonstrate that a certain product will make their test automation more robust and easier to maintain while potentially making automation peoples easier to replace, I think they might be willing to spend a few more bucks.
Also, open source software (like Selenium) is not welcome everywhere. For example, my last two clients had a policy to avoid open source software whenever possible. They want a number to call when they have problems and someone to blame when all hell breaks loose. That's stupid if you ask me but, unfortunately, quite common.
I do agree that the market for such product might be limited. But, fortunately, the potential clients are quite rich.
Tags for this Thread