Thursday, July 8, 2010

Run QTP from JUnit

Run QTP from JUnit is very straight forward. We just need to pass the path to the QTP script to the QTP.run method, and indicate whether we want QTP to be visible or not.

For example
QTP.runTest(false, "resources/QTP/FlexStoreHomeTest");

This statement will run QTP test case from "resources/QTP/FlexStoreHomeTest" with QTP not visible.




Below is the screenshot of my QTP test case

2 comments:

Amit Singh said...

where to find junit4qtp library
I am trying to import package junit4qtp
but unfortunately couldn't find anywhere, please help.

Anonymous said...

hi too bad you never released this.
:(
it could have been really useful.