SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How would Java express a LIST OF STRING to SilkTest ?

    Hi All:

    I am working with our developers, who have customized some tables and broken our tests.

    They are trying to add method to their code to return the table's contents like GetContents() does.

    It works, but it returns the code as one, really long STRING with comma and newline delimiters that is cut off at the maximum string length limit.

    Does someone know how to structure a Java array so that it is returned to SilkTest as a LIST OF STRING ???

    thanks.
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How would Java express a LIST OF STRING to SilkTest ?

    You cannot do it. You'll have to work
    with the comma seperated val.

    Tony

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How would Java express a LIST OF STRING to SilkTest ?

    Thanks Tony,
    I am starting to realize the same thing.
    I did not realize that Java did not have anything corresponding to the "LIST" datatype.
    (I thought Java was more advanced than it is :-)

    Do you happen to know if a Java "array" can be correctly mapped into a SilkTest array with matching dimensions ?

    thanks again,
    Rob


    [This message has been edited by RobKapteyn (edited 01-26-2001).]
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  4. #4
    Junior Member
    Join Date
    Jan 2001
    Location
    Boston, MA, US
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How would Java express a LIST OF STRING to SilkTest ?

    Rob,

    I was interested in your post so I did some investigating.

    The way that Silk seems to "see" LISTS (at least when they are written to a file) is as a long string delimited by commas and surrounded by braces {}, the type of LIST depends on the formatting of the data in the LIST.

    Given this, the quickest way I can see to "map" a Java object to a Silk object is to extend an existing Java class with a method to output a comma delimited string representing the way Silk stores a LIST.


    The easiest (in my opinion) way to collect the objects from your tables in Java would be using the built in vector class. It could be extended to include a -- STRING VecToSilk() --(or whatever you want to call it) method that would take the elements of the vector and return them as a STRING delimited with commas and surrounded by braces. Instead of reading this in Silk as a STRING object cast it as a ANYTYPELIST or LIST OF STRING object. You should be able to play with it as a list from there.

    The other way I can think of is to use Silk and create a function that takes in the Java object (however it is seen by Silk), takes it apart and converts it to a LIST OF STRING. Since Java gives you more flexibility in this area I would choose the first.

    PS- I didn't have time to test all of this, so it may be a little off, the biggest problem being whether the format used when writing/reading to/from a file is the same used in memory. If you want the script I used to test it send me an email

    Later,
    Bob

    B.Wessen@customerdialogue[noSpam].com
    (obviously omit the [noSpam])

    [This message has been edited by Bob_W (edited 01-26-2001).]
    _________________________
    Bob Wessen
    QA Engineer/Developer
    Customer Dialogue Systems
    www.assetplanner.com
    www.customerdialogue.com
    B.Wessen@customerdialogue.com
    _________________________

 

 

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 07:36 AM.

Copyright BetaSoft Inc.