I need a way to call a RFT script from a simple java class.
Has anyone tried this ? If so, would you please share the code ?
String commandToRun = "java -classpath <classpath> com.rational.test.ft.rational_ft -datastore <directory> -log <logname> [options] -playback <script-name> [ -args <values>]"
Process p = Runtime.getRuntime().exec(commandToRun);
You can use the callScript() method to launch a RFT testcase
or use the wrapper around command line API, like voks shown.
Software engineer http://www.000webhost.com/266351.html
You can use callScript() method to call a RFT script from Simple Java class but the Java Class should extend the RationalTestScript class.
Thanks and Regards,
You can also instanciate the RFT script class, like this:
Script1 myScript = new Script1();
The difference is cleaner result logs:
It doesn't say starting script... stopping script... script result... etc.