Forum Discussion

berndk's avatar
berndk
New Contributor
15 years ago

Is TestComplete capable of this 3 tasks?


Hello,



I have 3 questions before my boss is going to buy your TestComplete:



1.) Can TestComplete at all be integrated in the Visual Studio 2008/2010 build process ?

    If yes how? Link is appreciated!



2.) Lets assume this scenario: User enters data and the Store Procedure (MS SQL Server 2005)  writes the value into a certain field of a table. After that I want to run a Test to verify that the value in the database table is the value I except it to be.

Can this be done? Please a link so I can test this.



3.) Is it possible to run multiple Records/Tests at the same time? Like Run a UI Test and same time run a acceptance/story test (guess you name it database checkpoints). A link is welcome :)



7 Replies

  • Hi Bernd,




    Can TestComplete at all be integrated in the Visual Studio 2008/2010 build process ?



    Yes, it can. Please see the "Integration With Microsoft Visual Studio Team System" help topic ( http://www.automatedqa.com/support/viewarticle.aspx?aid=7837 ) for information on available features.




    User enters data and the Store Procedure (MS SQL Server 2005)  writes the value into a certain field of a table. After that I want to run a Test to verify that the value in the database table is the value I except it to be. Can this be done?



    This can be done with Database checkpoints (see the "Database Checkpoints" help topic ( http://www.automatedqa.com/support/viewarticle.aspx?aid=2551 ) for more information). Also, I recommend that you see the "About Checkpoints" ( http://www.automatedqa.com/support/viewarticle.aspx?aid=2566 ) help topic for a complete list of built-in checkpoints available in TestComplete.




    Is it possible to run multiple Records/Tests at the same time? Like Run a UI Test and same time run a acceptance/story test (guess you name it database checkpoints).



    Only a single test can be executed at a time. The point is that the main purpose of TestComplete is to emulate user actions and only a single user can work with the GUI at a time.


  • berndk's avatar
    berndk
    New Contributor
    Hello Allen,



    sorry for late replay busy + easter ;-)



    about point 3 imagine this scenario:



    What I want is to simulate several user, that means i have a server and 2 clients. Each of the clients are changing text in a textfield and save it to the database. I want to simulate a race condition scenario with multiple user in a client server environment.



    check who saved the data in database and check what was saved, is that possible?

  • Hi Bernd,





    If you decide to use the distributed testing approach, note that the total number of machines involved in your distributed test must coincide with the total number of TestComplete/TestExecute licenses.


  • berndk's avatar
    berndk
    New Contributor
    Only to make a database field comparison I have the feeling I should have studied at university... the manual makes me feel cold.



    A 10 step list is much more appreciated than a lot of theoretical text.



    Now I have setup the "Database table checkpoint" with a Select statement getting me the last changed row in the table like



    Select Top 1 * From Tablename order by xxdate desc



    I know the value changed in the GUI and I know therefore the value I should get from the Select Top 1... statement BUT I could not find any helpfull/mind opening text passage in your manual how do I compare this value?



    Where do I have to say compare the value changed from my GUI to this: (see image): I want to compare the State field with the Gui-TextField OR any socalled baseline-data(where I define that...)



    Can you help me please? My trial is soon ending...




  • berndk's avatar
    berndk
    New Contributor
    I forgot... when I run my database checkpoint I get at the end this error in the log:



    Type Message Time Link

    Unable to find record 0 in the dataset. 19:27:53 



    why record 0 ??
  • Hi Bernd,


    Most probably, the error message you get is caused by the fact that an empty dataset is returned from your database when the comparison is performed. Anyway, the task you need to accomplish (to compare a current DB table value with a current value in a text box) cannot be accomplished via built-in checkpoints. You will need to create a custom script which will retrieve the needed data for you and compare it with the current text displayed in your control. You can find references to sample scripts demonstrating how you can retrieve data from a DB in the "Working With Databases" ( http://www.automatedqa.com/support/viewarticle.aspx?aid=3694 ) help topic. The resulting code should look as follows:




    function test()

    {

      var guiVal = getValueFromGUI(); // Get the current value from the text box

      var dbVal = getValueFromDB(); // Get the current value from the DB via the needed SQL statement

      if (curVal != dbVal)

      {

        Log.Error("The values are different", "GUI value: " + guiVal + "; DB value: " + dbVal);

      }

    }