SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Sep 2001
    Location
    uk
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    ODBC connection to read from SQL Server at runtime

    Hi,
    I'm trying to POC OpenSTA, part of the brief is to create an ODBC connection to our test db to be able to access UserIDs etc at runtime and use them as variables.

    Having fiddled and trawled the usegroups, I have seen one reference to ODBC being used, but no examples, connection strings etc. There is no option in the DataSource field for ODBC or SQLServer, so my question is: is this even possible?

    Ideally I'd also like to write data back to a database at runtime, but I suspect that this might be out of scope for OpenSTA.

    any tips appreciated,

    regards

    Dan

  2. #2
    Moderator
    Join Date
    Jan 2005
    Location
    England
    Posts
    765
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ODBC connection to read from SQL Server at runtime

    Dan,
    When you create a new variable you can select to get it from a database (Dbase, Excel, MS Access).

    From the top menu - Variable - Create - Value Source: Database

    I'm not sure if you can write the data back though.

    Good luck,
    Steve
    Everywhere's within walking distance if you have enough time.

  3. #3
    Moderator
    Join Date
    Jan 2005
    Location
    England
    Posts
    765
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ODBC connection to read from SQL Server at runtime

    Dan,
    I may have misled you in my last post. I've just been playing with it.

    It seems that what actually happens is it uses the database connection to populate the variable definition in OpenSTA. It doesn't read it from the database during runtime (which I thought it did).

    You're other option is to write a VBscript to populate some include files from the database. Then launch OpenSTA from the command line (your openSTA script would use the include files). You could also process some of the test results files via vbscript and put it back into your database.

    I might have a play with this, I'll let you know if I get anywhere.

    Cheers, Steve

    Sorry, Steve
    Everywhere's within walking distance if you have enough time.

  4. #4
    Moderator
    Join Date
    Sep 2001
    Location
    Boston, MA
    Posts
    4,348
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ODBC connection to read from SQL Server at run

    Steve,
    Consider updating the OpenSTA FAQ or community documentation. with any info you uncover. A better explanation of this would be useful in the OpenSTA documentation.

    -Corey
    Corey Goldberg
    Homepage: goldb.org
    Twitter: twitter.com/cgoldberg
    Google+: gplus.to/cgoldberg

  5. #5
    Member
    Join Date
    Sep 2001
    Location
    uk
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ODBC connection to read from SQL Server at run

    Thanks for the quick responses guys, I think for now I'm going to just use files, it appears that there is NO interaction with any database other than to hoover up values and plop them into the script.

    Our test harness injects new stuff onto the system and writes the IDs onto a DB, simultaneously we wanted OpenSTA to pick up those ids from the DB during a test run and search on them to generate some decent load.

    Also am I being a bit thick here but what do these options actually mean: LocalServer? I've an instance of SQL Server 2003 on this box, so I'm assuming LocalServer refers to SQL Server as there are no other dbs installed.

    Lastly, can anyone get excel to work as a db option? I can't.

  6. #6
    Moderator
    Join Date
    Jan 2005
    Location
    England
    Posts
    765
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ODBC connection to read from SQL Server at run

    Dan,
    I just updated the opensta portal on your Excel question:
    http://portal.opensta.org/?op=modload&am...lesFromDatabase
    Everywhere's within walking distance if you have enough time.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.11%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 09:21 AM.

Copyright BetaSoft Inc.