SPONSORS:






User Tag List

Results 1 to 9 of 9

Thread: Using Verify...

  1. #1
    Member
    Join Date
    Jan 2001
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using Verify...

    Silk USers,
    How do we test the text in the JavaSwingTable
    using the Verify statement...
    Thanks

  2. #2
    Member
    Join Date
    Jan 2001
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Using Verify...

    Thank you so much ...I used the same code to test the content and it worked....

    I still have a question...
    In a table, when trying to add/delete
    a component, After running the testcase
    I want to check Component1 is added in the
    table...Say it is a huge Javatable,
    How do I verify the WIndow.Table=Component1?

    I am new user working on Silk, I have weird
    questions and doubts...
    Thanks a lot for all the response...

  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: Using Verify...

    Giriga:

    You can use the Verify function with two LIST OF STRING variables.
    Table.GetContents() also returns a LIST OF STRING result.

    I usually add a very helpful SilkTest "trick".

    I use the list constructor "{...}" in the Verify() function for the Expected Data.
    I then wrap the entire thing with do .. except and ExceptLog().

    When you first create this -- put garbage data as a "placeholder" in the Expected Data list.

    The first time that you run the test, you will get a verify error in the results.

    If you click on the error, the "Difference Viewer" will appear.
    Select the menu item "Results" -> "Update Expected Value".
    Your expected data will be instantly automatically filled in !
    Make sure that it is correct, and you have an excellent regression test.

    Note: to use this feature, construct you Verify() EXACTLY as I have shown.
    If you use the optional third parameter to Verify(), the update mechanism will not work!


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

  4. #4
    Junior Member
    Join Date
    Feb 2001
    Location
    dublin
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Using Verify...

    Could possibly use this
    [ ] Integer index
    [ ] integername = location.location.of.page2.FindItem(sNameFor3rd)
    String sNameFor3rd = "test"
    Verified against the variable that was originally been set as the input to be in the dropdown. Could use another if statement with a log error output etc..

  5. #5
    Member
    Join Date
    Jan 2001
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Using Verify...

    Tried all the different ways mentioned in
    Silk OnlineHelp.But it doesn't seem to
    work with the Tables..
    The user can give the Row and column
    number if the table is small, if the Table
    is huge , how do we verify , if the table
    contains the added component...

    Please let me know...
    Thanks

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

    Re: Using Verify...

    Giriga:

    You need to explain better.

    If it doesn't work what does it do (and not do) ?

    When you talk about an "added component", do you mean that there is a custom object in a cell of the table ?

    If so, describe it.

    I have dealt with some of these -- but it can be VERY complicated.

    -Rob
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  7. #7
    Member
    Join Date
    Jan 2001
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Using Verify...


    Let me briefly explain the application I
    am testing..
    It is Java application.
    Feature to be tested: Add user 'tuser1'.
    Java table has 2 Fields:User and User Profile
    There are many entries in the Table.

    The testcase involves adding User to the
    table.
    After running the testcase, I want
    to verify 'tuser1' exists in the table.

    Hope!! the explaination is OK...
    Thanks again for the support...

    Girija



  8. #8
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Using Verify...

    Girija,

    If you execute your test Manually, how do you verify that 'user1' has been added to the table? If you don't know the answer to this one, then it will be very hard (maybe impossible) for you to do it with a test tool. If you know the answer to the question, then you should follow the same steps feeding all the steps to SilkTest.
    For example:
    After adding 'user1', maybe there is an edit/update or a search button or menu item that you can click/select to allow you to input 'user1'. If 'user1' and its profile are displayed, then you know that it was added to your table. If not, then the record addition failed.
    If you can query your database via SQL statements, you can use a SELECT statement to find out if the row/record you just added is in the table.

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

    Re: Using Verify...

    Giriga:

    Read the SilkTest online help for the TABLE Class for all of the methods you can use.
    One method is called GetValue().
    This retruns the value of a single Cell in the table, for which the location is specified
    by a parameter of type TABLECELL.
    "TABLECELL" is supposed to allow you to address the cell using Row and Column headings,
    but I have never seen this work with Java tables.
    Just use Row and Column numbers instead.

    Example:
    -Rob


    [This message has been edited by RobKapteyn (edited 02-21-2001).]

    [This message has been edited by RobKapteyn (edited 02-21-2001).]
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.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 12:54 PM.

Copyright BetaSoft Inc.