| || |
Referencing external .jar and running in Test Manager
I am having a frustrating problem and was wondering if anyone else out there has experienced the same, and if there is a solution or work around.
I am using RFT 6.1.1 (java). In my project I am referencing an external .jar that we use for reading in Excel documents. Everything runs great if we execute from Eclipse, however, when running from TestManager, we get a java.lang.NoClassDefFoundError as soon as one of the scripts tries to read in data from Excel.
I read some posts from a while ago that mentioned the customization folder, however, this folder does not exist for my installation (maybe a version thing?) I tried to create it in the RFT install directory and place the jar there, but no luck.
Any input would be greatly appreciated.
Re: Referencing external .jar and running in Test Manager
After talking to Rational, I have an answer. Here is the article they sent me:
According to our knowledge base the external JAR files should be placed
in the customization directory when a user wants external classes
compiled in the JAR files from both XDE Tester® and or Functional
Tester® scripts.This will also add the JAR to the playback classpath
when executed from the eclipse shell.
The user must add the JAR to the 'Java Build Path' to be able to compile
against classes in that JAR.
However, it will not automatically add it to the classpath when
executing Tests from Test Manager or from the command line. What we
suggest is that you place your JAR files in the customization directory
and add them to the 'Java Build Path' locally.
We automatically remote the customization directory and make JARs in the
cust directory available to the script all the time (when run from the
command line and Test Manager).
The correct way to add external classes to the execution classpath is to
place them in the customization directory. The issue is that in order to
remote the execution of any script we need a definable way to determine
the class closure. Allowing any class off the systems classpath does
not help us with execution on other systems, so we explicitly control
the classpath. You can find the customization directory by checking the
following registry setting:
HKEY_LOCAL_MACHINE\SOFTWARE\Rational Software\Rational Test\8\Rational
FT Customization Directory
Thought this might be useful for others since their Knowledge Base online has not been updated yet.