We are currently migrating a project from QTP to Selenium. We have a few QTP scripts used for regression testing in the project, and we want to avoid the work of rewriting them. Is there any way to execute the old QTP scripts from any Selenium framework or IntelliJ IDEA or Eclipse etc without QTP?
3 Answers
No, not in normal situations. QTP is an expensive, commercial tool and if there was a way to easily run the scripts outside QTP, HP would have had a bad business case.
You'll have to rewrite your code into Java code. Maybe there are some VB to Java convertors (note: QTP scripting language is VBScript, not VB) that could make some of the work easier, but I wouldn't bet my money on them. Java is a very strong typed, object oriented language, while VBScript is a very weak typed much more functional language. Even if you had a converter, your Java code would be very crippled.

- 7,267
- 2
- 27
- 47
-
+1 with a minor note: "Expensive" being a matter of bad price/feature&performance-ratio, I'd call it "high-priced", not "expensive" ;) – TheBlastOne Oct 22 '12 at 11:52
-
@TheBlastOne You have a good point. Expensive is a relative term, I like the 'high-priced' label better. – AutomatedChaos Oct 22 '12 at 13:52
I would say, not in any situation. There is a possibility of executing QTP scripts from outside, but not without a QTP license.
There is no automatic converter from QTP to Selenium that exists yet either.
While it's understandable that you don't want to lose your existing QTP scripts, it would be best to start working on writing Selenium tests now rather than later.
I think if the scripts are made in Jscripts , it would be easy at some extent , we can execute them on Selenium the lines which are not Inluced with Application Objects(Browser,Page,Field). There are few problems existed with Excel stuff, File System objects...etc, since Selenium(Java) we are importing few package concepts while we are handling certain objects. I think there are more difficluties involved while we are converting them and executing the QTP scripts in Selenium. Instead of that It would be better if we start Selenium coding from Scratch.

- 1