SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Log test result to a database thru a asp page


    I am testing some non-web based applicatoin testing, and I need to log the test result to a DB thru a asp page.
    If the test result is sucessfully log, the asp page will return me something like "Log Sucessful" in a html page.

    Right now, I am using Browser.LoadPage( "http://machine/LogToDB.asp?TestCaseNumber="1"&Result="Pass"") to call the URL.
    But the problem is that it takes time the load the browser in order load the page. This method is very slow and inefficient.

    Is there a better way to do that in silk? (Perhaps something like http get using telnet? or the get() function in Perl? )
    If I don't need to be any browser object, it will be good.

    This is the code for my function right now:

    logToDB( string aProduct, string aTestCaseID, string aPassFail, string aLogText optional )

    const String logAspURL = "http://machine/LogToDB.asp"

    // Composing the argument that will be passed to the log.asp page
    String aPostArg = logAspURL
    aPostArg = "{aPostArg}?product={aProduct}"
    aPostArg = "{aPostArg}&TestCaseID={aTestCaseID}"
    aPostArg = "{aPostArg}&LogText={aLogText}"

    if ( aLogText!= NULL )
    aPostArg = "{aPostArg}&LogText={aLogText}"

    // Call the asp page
    Browser.LoadPage( aPostArg )


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

  2. #2
    Junior Member
    Join Date
    Oct 2000
    Location
    Cambridge MA USA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Log test result to a database thru a asp page

    I know this isn't the question you asked, but...

    1/ What is the underlying database?
    Can you get to it using ODBC or something else to log the results? That would circumvent the asp page ane the browser and might be a tad quicker.

    2/ Do you have to send up the results in real time? Could you save a few (dozen) test results in some local file, and then write a quick Silk script to send all the results to the asp page. Then you could iterate through several pages with one incarnation of the browser (would eliminate start-up costs as well as any bookkeeping that Silk would do.

    3/Combining the two thoughts; can you ftp or http the results to the target machine as a file, and process it locally somehow?




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

  3. #3
    rg
    rg is offline
    Member
    Join Date
    Feb 2000
    Posts
    98
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Log test result to a database thru a asp page

    The direct-to-database suggestion is good. That would probably be the fastest. Other suggestions are:

    1. Use the results repository code and ASP results viewer that comes with SilkTest.

    2. Pull in wininet.dll into SilkTest and make the HTTP call directly from SilkTest (without going through the browser). You will need to declare wininet.dll in SilkTest (there are some posts that have covered this in the past...and even an article in Segue's newsletter).

  4. #4
    Junior Member
    Join Date
    Jan 2002
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Log test result to a database thru a asp page

    Thanks for the suggestions guys

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

 

 

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 04:17 AM.

Copyright BetaSoft Inc.