Printer FriendlyEmail Article Link

ITEST: How to add a custom third-party JDBC driver to Spirent iTest

Answer

To achieve this make sure the jdk is installed in your machine, If not, you can download from the below location and install it,


https://www.oracle.com/technetwork/java/javase/downloads/jdk6u37-downloads-1859587.html


After jdk is installed, Please try the below steps,

Take the backup of com.fnfr.itest.databaseservice_x.x.x.xxxx.jar file located in the <iTest installation>\plugins directory

1. Extract the com.fnfr.itest.databaseservice_x.x.x.xxxx.jar file located in the <iTest_installation>\plugins directory, to some other location say, D:\temp and update the MANIFEST.MF file, following the below instructions as,

                a. Copy the JDBC jar into the extracted folder:


                b. Edit the MANIFEST.MF text file, located in META-INF directory,

 
                Important: In MANIFEST.MF, you must use a maximum line width of 71 characters.

                Edit the line that starts with Bundle-ClassPath. Add your jar file name as the last item in the list followed by a comma. In the following example, we add sqlitejdbc-v056.jar just before the final ”.” (Remembering the 71-character limit):

                Bundle-ClassPath: mysql-connector-java-5.1.7-bin.jar,ojdbc6.jar,sqljdb c.jar,postgresql-8.4-701.jdbc4.jar,sqlitejdbc-v056.jar,.


2. Open the command prompt terminal

3. Go to the path where all the files has been extracted, say D:\temp,

D:\temp> C:\Program Files\Java\jdk1.6.0_37\bin


4. Give the below command,

`D:\temp> C:\Program Files\Java\jdk1.6.0_37\bin\jar cvfm <jar_file_name>.jar META-INF/MANIFEST.MF META-INF/FANFARE.DSA META-INF/FANFARE.SF com about.html plugin.xml <jdbc_jar_file_name>

Example:

D:\temp> C:\Program Files\Java\jdk1.6.0_37\bin\jar cvfm com.fnfr.itest.databaseservice_4.1.4.59908.jar META-INF/MANIFEST.MF META-INF/FANFARE.DSA META-INF/FANFARE.SF com about.html plugin.xml xxxxx.jar yyyyy.jar zzzzz.jar


5. This will create a new jar file in the below location with the name specified in the above command,

D:\temp


6. Copy and paste this new jar file in the iTest installation plugins directory. (Overwrite the existing file when it prompts, since we have already taken back up).

NOTE: The jar file name <jar_file_name>.jar should be exactly same as default jar file name which you had extracted. Also, as a reminder make sure you have the backup of default jar file before replacing the new jar file.


7. Delete the .metadata folder of the workspace.


8. Restart the iTest via command prompt using the –clean option,

C:\Program Files\Spirent Communications\iTest 4.2>iTest.exe –clean


9. Specify the appropriate session profile property settings in Database session to connect third-party JDBC database.


In this example we use:

Database type: Other

Driver class: org.sqlite.JDBC

JDBC connection string: jdbc:sqlite:vqa.db

 


Product : iTest Enterprise