How can a Rational Functional Tester script figure out under which version of RFT it executes/was built with?
I digged through the documentation, and the closest I found was
com.rational.test.ft.script.ScriptUtilities.getOperatingSystemVersion()
which returns OS version info, which might be close, but still not what Daddy is looking for ;O
I didn't find anything in the APIs or in the Windows registry.
The only way I can think of is to create a custom method and include it in you helper class. You can find the versione in the file
C:\IBM\SDP\FunctionalTester\properties\version\IBM_Rational_Functional_Tester.*.*.swtag
, change the path to match your installation.This is a quite expensive method, because it istantiates a DocumentBuilder for XML parsing. As an alternative, load the file content as a String and parse it with a RegExp, use this matching pattern: [0-9]\.[0-9]\.[0-9]