SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Dec 1999
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Debugging under InvokeJava

    For custom Java classes, SilkTest provides support using the InvokeJava() method. InvokeJava() requires you to create a Java class (I'll call it TestClass), which you put in the classpath, and which SilkTest will create an instance of when you call InvokeJava("TestClass",{}) from the SilkTest script. The unusual aspect of this is that you put all of your test code in the constructor of TestClass. So it is by the instantiation of TestClass that the actual test code is run.

    My problem is that my TestClass constuctor has gotten somewhat complex, and I will need to debug it. But I can not figure out how to do it in this context. I am using JBuilder v3.

    Does anyone know how to debug Java code that is launched via the InvokeJava() method?

  2. #2
    Junior Member
    Join Date
    Dec 1999
    Location
    San Frnancisco
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Debugging under InvokeJava

    You can't debug your class becuase Silk executes it in its own thread. For some reason Silk doesn't execute this kind of things on Swing events thread. So to work around this problem you have two options.
    Fisrt do System.printlns or return values that you need to check at runtime into Silk environment. By the way, you don't want to overload your constructor with a lot of code. You might want to delegate some stuff to other class methods

  3. #3
    Senior Member
    Join Date
    Mar 2001
    Posts
    161
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Debugging under InvokeJava

    User K. Hari Prasad (khprasad@quark.stpm.soft.net) posted:

    Hi
    My scripts failed when run normally .But when I tried to debug .I got
    perfect output in transcript file.
    Could anyone explain me??

    Thanks

    K.Hari Prasad
    Post message: silktest@yahoogroups.com
    Subscribe: silktest-subscribe@yahoogroups.com
    Unsubscribe: silktest-unsubscribe@yahoogroups.com
    List owner: silktest-owner@yahoogroups.com
    URL to this page: http://groups.yahoo.com/group/silktest


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



  4. #4
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Debugging under InvokeJava

    Your script might be running too fast. Put a sleep() somewhere could help. Solved similar problem using sleep(). My problem was the javascript call to the browser was too fast, before the page was fully rendered. You can also use WaitForReady() but I assume they use such thing internally so it might not always prove useful.

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

 

 

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 05:48 AM.

Copyright BetaSoft Inc.