Forum Discussion

Gerhardt's avatar
Gerhardt
New Contributor
12 years ago

Multiple Threads / Threading with TestComplete

Hello Community,



at the moment im at the Trialphase of Testcomplete and since now have written some scripts to write something in an SQL Database and insert this with an other routine from the SQL Server to another Database. After this im Checking if the Data arrive at the last position.

Now i want to Check this on multiple positions at the same time, to see how long it takes for each step.



Is there a possibility for TestComplete to run Tests or Scripts at the same time? So that i can check more then one position at the time.



Regards
  • Hi Hugo,



    Yes, you are correct that Network Suite runs tests simultaneously on different machines. So, with the help of synchronization points supported by Network Suite functionality, it is possible to execute SQL statements (almost) concurrently. Maybe, this will correspond to what Mel needs.

    However, if the task is to measure time required to transfer data from one location to another, I think that it might be more easy and with a much better precision to process SQL transaction logs and get the time when data arrived from there.

    (Though I am also far not sure that I correctly got the initial problem...)
  • hlalumiere's avatar
    hlalumiere
    Regular Contributor
    VBScript by definition is single-threaded, although a COM object could perform operations asynchronously. You can also make asynchronous calls to the API, but then you have to handle the return event manually and all sorts of ugly code ensues.



    Your best bet would be to write a small COM-visible library in .NET to wrap your asynchronous calls and handle them gracefully, and call that from your script.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Hugo,



    Yes, you are correct that Network Suite runs tests simultaneously on different machines. So, with the help of synchronization points supported by Network Suite functionality, it is possible to execute SQL statements (almost) concurrently. Maybe, this will correspond to what Mel needs.

    However, if the task is to measure time required to transfer data from one location to another, I think that it might be more easy and with a much better precision to process SQL transaction logs and get the time when data arrived from there.

    (Though I am also far not sure that I correctly got the initial problem...)
  • hlalumiere's avatar
    hlalumiere
    Regular Contributor
    Unless I am mistaken, the network suite does not run multiple operations on a single machine, it just runs multiple tests on multiple machines simultaneously, right? The OP's issue seems more about passing multiple queries to a database server simultaneously inside a single test, lest I misread...
  • Gerhardt's avatar
    Gerhardt
    New Contributor
    Thank you for you replys.



    @Alexei i think you got my problem right and i will start to Test the Netzwork Suite. If it doesnt fit my requirements, i will get back and share my results.



    @Hugo Its kind of the same idea, i had for an alternative way, but i searched for a solution with is provided by testcomplete or one of the other smartbear products. 



    Regards