SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Setting environment variables: CLASSPATH

    Hi,

    In the SilkTest help, in the Setting environment variables: CLASSPATH topic, there is a note that reads:

    If you are working with a custom launcher that ignores the CLASSPATH you have set, the correct .jar file may not be loaded and SilkTest may lose object recognition.

    I am having that problem. If I launch SilkTest manually and then run a testcase (appstate none) Silk is able to recognize my swingall objects, however if I start the app using SilkTest's recovery system, SilkTest is not able to SEE the swing objects.

    Does anybody know how to solve this problem?

    Thanks,

    -maa


  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting environment variables: CLASSPATH

    1. If you're starting the application manually from a shortcut, you could code your test to do the same thing by entering the shortcut name into the Windows/Run dialogbox.

    2. Another simpler way is to insert a copy of the silktest_java2.jar file into the lib/ex folder of the Java driver used by your application. That way, the code will be there no matter how you start the app.


    John



    ------------------

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting environment variables: CLASSPATH

    1. If you're starting the application manually from a shortcut, you could code your test to do the same thing by entering the shortcut name into the Windows/Run dialogbox.
    2. Another simpler way is to insert a copy of the silktest_java2.jar file into the lib/ex folder of the Java driver used by your application. That way, the code will be there no matter how you start the app.

    1. Didn't work. I coded the script so it clikcs the AUT's icon located on the TaskBar.
    But Silk wasn't able to recognize the java objects.

    2. Didn't work either. Btw, I am using the silktest_java1.jar file. If I use silktest_java2.jar SilkTest doesn't recognize the JavaObjects even when I bring my AUT manually.

    Thanks,
    -maa

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting environment variables: CLASSPATH

    What is the level of the VM you are using to run your application? This will determing which Segue jar file you must use. I'm betting you need that Java2.jar file. The key will be to force it into your classpath as suggested above, but sticking it into the lib/ext folder.



    ------------------

  5. #5
    Junior Member
    Join Date
    Jun 2002
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting environment variables: CLASSPATH

    I am using Java RunTIme Environment, Standard Edition 1.4.0

    Default Virtual Machine Version 1.4.0-b92
    Java Plug-in 1.4.0

    I have both SilkTest_Java1.jar and SilkTest_Java2.jar in all the instances of the \lib\ext directory
    which are 4:

    - My AUT has ../../JRE\IBM\1.3\lib\ext
    - C:\j2sdk1.4.0\jre\lib
    - C:\Program Files\Java\j2re1.4.0\lib\ext
    and Silk's
    - C:\Program Files\Segue\SilkTest\JRE1.2\lib\ext

    What really bothers me is the fact that the problem only occurs when I use SilkTest to invoke the AUT.

    Thanks,
    -maa

  6. #6
    Junior Member
    Join Date
    Oct 2002
    Location
    Kirkland, WA, USA
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting environment variables: CLASSPATH

    I had this exact same problem. It's a bug with SilkTest 5.5.3. Check out this post, I think it will solve your problems:
    http://www.qaforums.com/Forum1/HTML/004036.html

    Aaron

  7. #7
    Senior Member
    Join Date
    Nov 2001
    Location
    UK, Oxford
    Posts
    150
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting environment variables: CLASSPATH

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by matest2:

    What really bothers me is the fact that the problem only occurs when I use SilkTest to invoke the AUT.
    <HR></BLOCKQUOTE>
    That sounds like a setup issue, rather than the bug refered to. Whether I started my AUT manually or via ST, I could get ST to lose injection or not, depending on whether I touched the menu items.

    If it is a setup thing, a few things which may be helpful:


    First, I have experienced problems in the past when I have had too many runtime environments installed. Now you have the distributable JRE(C:\Program Files\Java\j2re1.4.0) and the JRE which comes with the developement kit (C:\j2sdk1.4.0\jre) and that is fine. If you have any others it can cause problems. So uninstall them.
    What is this JRE 'My AUT has ../../JRE\IBM\1.3...'? 1.3...?

    Second, I put a copy of the SilkTest2.jar file in Segue's 'Segue/SilkTest/lib/Extend'
    directory.

    Third, When Silktest invokes your app, does it pop up a dos prompt? Check to see if one or other of the SilkTest.jar files has actually been loaded. It should also tell you which version of java it is running your app on.

    When you add jar files to any of the lib/ext directories, I think you have to shut down the JVM (i.e. close down all instances of your app) otherwise they will not be loaded.
    Likewise, when adding jar files to any of SilkTest ext directories, shut down SilkTest and reopen.

    I hope some of this helps

    ------------------


    [This message has been edited by johntest (edited 11-13-2002).]
    Tempus fugit, Carpe Diem, et al

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:56 PM.

Copyright BetaSoft Inc.