Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Nov 2002
    Tallahassee, Florida, USA

    datapools or read from .txt or excel file _-Help Please

    I am trying to figure out how to create and access a datapool in a gui script in robot. I have tried following the help files but must not be configuring the header file correctly, I get errors referrencing the .sbh file. Can anyone please assist me in understanding this process better. Maybe if someone can post a sample header file and sample datapoolopen examples. I would also like to be able to read from an excel file, mainly I would like to be able to open a excel file and goto any certain row or colum and grab the data stored in there. Please bare with me as I am fairly new to the product.. Any help would be greatly appreciated. Thank you

  2. #2

    Re: datapools or read from .txt or excel file _-Help Please

    Read the FAQ of the site, please do not use "Help or Please" in your subjects.

    Also read the registration email again.
    AJ Alhait
    BetaSoft Inc.

  3. #3
    Junior Member
    Join Date
    Nov 2002
    Tallahassee, Florida, USA

    Re: datapools or read from .txt or excel file _-Help Please


  4. #4

    Re: datapools or read from .txt or excel file _-Help Please

    Please re-post with proper subject line. This is a valuable question, but many will not even read it with an improper subject line.

    I'm closing this thread.

    Scott Barber, Sr. Performance Engineer
    Scott Barber
    Chief Technologist, PerfTestPlus
    Executive Director, Association for Software Testing
    Co-Author, Performance Testing Guidance for Web Applications

    If you can see it in your mind...
    you will find it in your life.

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Montreal, QC, Canada

    Re: datapools or read from .txt or excel file _-Help Please

    Since you are new it may be helpful to note that the search capability would bring you some answers on both questions you have as they've been problems for many.

    You need the '$Include "sqautil.sbh" somewhere that your script is referencing.

    'This opens and retrieves (fetches) the first row in the specified datapool
    lldpId = SQADatapoolOpen("MyDatapool")
    lldpresult = SQADatapoolFetch(lldpId)

    'I do this to check the result and make sure i'm working with something
    lldpresult = CheckDPResult(lldpresult)

    'Loop through rows in datapool until no more row to process
    Do While lldpresult <> sqaDpEOF

    lsQuery = ""

    'Put the SQL Query that resides in column 1 of the current SQADatapoolFetch into lsQuery
    lldpresult = SQADatapoolValue(lldpId, 1, lsQuery)


    'Go to next row
    lldpresult = SQADatapoolFetch(lldpId)


    Function CheckDPResult (pldpresult as Long) As Long

    If pldpresult <> sqaDpSuccess then

    Select Case pldpresult

    Case sqaDpInvalidArgument
    SQALogMessage sqaWarning, "Invalid Datapool Argument", " "
    Case SQADPUnitialized
    SQALogMessage sqaWarning, "Datapool Uninitialized", " "
    Case sqaDpFailure
    SQALogMessage sqaWarning, "Datapool Failure", " "
    Case sqaDpEOF
    SQALogMessage sqaWarning, "Datapool End of File", "Datapool Empty"
    Case sqaDPExtendedError
    SQALogMessage sqaWarning, "Datapool Extended Error", " "

    End Select

    'just so it won't endlessly loop through the Do While if the Datapool did not succeed
    CheckDPResult = sqaDpEOF
    Exit Function

    End if

    CheckDPResult = pldpresult

    End Function

    As for using Excel you can use ADO or excel object (look at Excel library and find info on accessing using ADO at http://groups.yahoo.com/group/RationalUsers/ you need to register but it's free).





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:21 PM.

Copyright BetaSoft Inc.