- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-23-2009 02:17 PM
JNLP files are used to launch java applications served by a web server using Java Web Start.
First you need to have Java Web Start installed on your machine. If you have JDK, it is in the bin folder of your installation. (File name: javaws)
You can launch an application by pointing javaws to the URL of the JNLP file.
For example, to launch a demo swing application, the command would be:
javaws http://java.sun.com/javase/technologies/desktop/ja
vawebstart/apps/swingset2.jnlp
Now, to make it talk to iTest, this needs to be started with the iTest jvm arguments. javaws lets you specify these arguments with the -J option.
So, to launch it with iTest args, the command would look like:
javaws -J-javaagent:{iTest Swing resources folder}\SwingTestHarness.jar -J-Xbootclasspath/a:{iTest Swing resources folder}\SwingTestHarnessInterfaces.jar;{iTest Swing resources folder}\SwingTestHarness.jar;{iTest Swing resources folder}\xmlwriter-2.2.jar http://java.sun.com/javase/technologies/desktop/ja
vawebstart/apps/swingset2.jnlp
where {iTest Swing resources folder} is the path to the swing resources folder in your iTest installation. This folder is located at iTestHome/plugins/com.fnfr.svt.applications.java.s
You should put this command in a .bat file (.sh for UNIX based systems)
Now, you can launch this batch file from iTest swing session. In the Swing session profile, select the property "Launch a custom application" and provide the batch file in the "Command to launch the application". You will see a splash screen and after loading all the required JAR files, the application will load, ready to be tested.
Re: How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-28-2009 02:06 PM
All paths need to be in double quotes.
On my machine {iTest Swing resources folder} is C:\Program Files\Fanfare\iTest 3.3.1\plugins\com.fnfr.svt.applications.java.swing
So my batch file looks like:
javaws -J-javaagent:"C:\Program Files\Fanfare\iTest 3.3.1\plugins\com.fnfr.svt.applications.java.swing
.resources_3.3.1.34823\SwingTestHarness.jar" -J-Xbootclasspath/a:"C:\Program Files\Fanfare\iTest 3.3.1\plugins\com.fnfr.svt.applications.java.swing .resources_3.3.1.34823\SwingTestHarnessInterfaces. jar";"C:\Program Files\Fanfare\iTest 3.3.1\plugins\com.fnfr.svt.applications.java.swing .resources_3.3.1.34823\SwingTestHarness.jar";"C:\P rogram Files\Fanfare\iTest 3.3.1\plugins\com.fnfr.svt.applications.java.swing .resources_3.3.1.34823\xmlwriter-2.2.jar" http://java.sun.com/javase/technologies/desktop/ja vawebstart/apps/swingset2.jnlp
Re: How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-04-2009 03:18 PM
How does this command change for Linux?
My javaws is located in /usr/jre1.6.0_13/bin/ folder.
The following command works in shell. It launches SwingSet2 application as expected.
/usr/jre1.6.0_13/bin/javaws http://java.sun.com/javase/technologies/desktop/ja
vawebstart/apps/swingset2.jnlp
But iTest on Linux does not seem to understand the following command. I get a javaws splash screen which goes away after about 5 seconds. Then nothing happens.
/usr/jre1.6.0_13/bin/javaws -J-javaagent:"/root/Fanfare/iTest_3.3/plugins/com.
fnfr.svt.applications.java.swing.resources_3.3.1.3 4823/SwingTestHarness.jar" -J-Xbootclasspath/a:"/root/Fanfare/iTest_3.3/plugi ns/com.fnfr.svt.applications.java.swing.resources_ 3.3.1.34823/SwingTestHarnessInterfaces.jar"; "/root/Fanfare/iTest_3.3/plugins/com.fnfr.svt.appl
ications.java.swing.resources_3.3.1.34823/SwingTes tHarness.jar"; "/root/Fanfare/iTest_3.3/plugins/com.fnfr.svt.appl
ications.java.swing.resources_3.3.1.34823/xmlwrite r-2.2.jar" http://java.sun.com/javase/technologies/desktop/ja vawebstart/apps/swingset2.jnlp
Any ideas?
Re: How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-04-2009 03:25 PM
On linux, the path separator is ':' not ';'
:)
Re: How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-04-2009 03:51 PM
Replaced ";" with ":"
Still does not work. My command looks like this:
/usr/jre1.6.0_13/bin/javaws -J-javaagent:"/root/Fanfare/iTest_3.3/plugins/com.
fnfr.svt.applications.java.swing.resources_3.3.1.3 4823/SwingTestHarness.jar" -J-Xbootclasspath/a:"/root/Fanfare/iTest_3.3/plugi ns/com.fnfr.svt.applications.java.swing.resources_ 3.3.1.34823/SwingTestHarnessInterfaces.jar": "/root/Fanfare/iTest_3.3/plugins/com.fnfr.svt.appl
ications.java.swing.resources_3.3.1.34823/SwingTes tHarness.jar": "/root/Fanfare/iTest_3.3/plugins/com.fnfr.svt.appl
ications.java.swing.resources_3.3.1.34823/xmlwrite r-2.2.jar" http://java.sun.com/javase/technologies/desktop/ja vawebstart/apps/swingset2.jnlp
Re: How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-23-2009 01:43 AM
Hi All,
Has something changed since iTest 3.3 ? I was able to launch the application via Java Web Start in iTest 3.3 according to the information posted. I upgraded to iTest 3.4 and adapted the bat file to match the new path,
when I start this Swing session profile referencing the bat file, my Java applet starts fine, but the iTest session window says "Wainting for iTest to connect to the application" and eventually times out.
Any idea about this?
Re: How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-23-2009 11:13 AM
Just a hunch.
When you add iTest JVM arguments, add this one too:
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun
(refer to http://forums.fanfaresoftware.com/fnfr/board/messa
Also, double check your batch file to ensure you have your PATHS set correctly.
If it does not help, please contact Fanfare Support.
Re: How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-27-2009 01:35 PM
ivano,
We have realized that the JNLP launcher (javaws) has a bug in newer versions of JDK.
If you install JDK 1.6.0.6 on your machine and use the "javaws" provided in this JVM, then this should start working again
Re: How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-02-2009 12:05 AM
PreetS,
That did the trick for me! This is the bat file I use to launch application via JNLP file in iTest 3.4.1.
cd C:\Program Files\Java\jdk1.6.0_06\bin
javaws -J-javaagent:"C:\Program Files\Fanfare\iTest 3.4\plugins\com.fnfr.svt.applications.java.swing.resources_3.4.1.40936\SwingTestHarness.jar" -J-Xbootclasspath/a:"C:\Program Files\Fanfare\iTest 3.4\plugins\com.fnfr.svt.applications.java.swing.r esources_3.4.1.40936\SwingTestHarnessInterfaces.ja r";"C:\Program Files\Fanfare\iTest 3.4\plugins\com.fnfr.svt.applications.java.swing.r esources_3.4.1.40936\SwingTestHarness.jar";"C:\Pro gram Files\Fanfare\iTest 3.4\plugins\com.fnfr.svt.applications.java.swing.r esources_3.4.1.40936\xmlwriter-2.2.jar" -J-Djavax.xml.parsers.DocumentBuilderFactory=com.s un.org.apache.xerces.internal.jaxp.DocumentBuilder FactoryImpl "my path to JNLP file"
thank you for helping.
Re: How to test Swing applicatio n launched via Java Web Start (JNLP files)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-25-2010 11:56 PM
Hi,
I am new to iTest and We are trying to analyze iTest options to start using it in our EMS GUI test automation. I have iTest 3.4 and jdk1.6.0_06 installed in my system. I am not able to launch swing application via java web start, I am using the following command in .bat file,
javaws -J-javaagent:"C:\Program Files\Fanfare\iTest 3.4\plugins\com.fnfr.svt.applications.java.swing.resources_3.4.0.39755\SwingTestHarness.jar" -Xbootclasspath/a:"C:\Program Files\Fanfare\iTest 3.4\plugins\com.fnfr.svt.applications.java.swing.r esources_3.4.0.39755\SwingTestHarnessInterfaces.ja r";"C:\Program Files\Fanfare\iTest 3.4\plugins\com.fnfr.svt.applications.java.swing.r esources_3.4.0.39755\SwingTestHarness.jar";"C:\Pro gram Files\Fanfare\iTest 3.4\plugins\com.fnfr.svt.applications.java.swing.r esources_3.4.0.39755\xmlwriter-2.2.jar" -J-Djavax.xml.parsers.DocumentBuilderFactory=com.s un.org.apache.xerces.internal.jaxp.DocumentBuilder FactoryImpl http://java.sun.com/javase/technologies/desktop/ja vawebstart/apps/swingset2.jnlp
