Forum Discussion

tjohn's avatar
tjohn
Occasional Contributor
4 years ago
Solved

DB Checkpoint - How to avoid True/False conversion

I Encountered a situation while creating Database checkpoint.

The SQL Table (Microsoft SQL Server Management Studio) stores the value as 0 or 1, BUT the TestComplete DBTable converts it to True or False and stores it as True or False..

Does anyone know if TestComplete can be configured such that it does NOT convert to True/False, but instead just display the value as stored in the database tables?
 
Thanks in advance.
  • tjohn's avatar
    tjohn
    4 years ago

    Thanks sonya_m for the explanation. Yes, what i was after was that the visual representation of the stored value and baselined value to be the same. To that effect i did create a support ticket and received a satisfactory/working solution to keep the data from converting when the column's datatype is 'bit' as below:

     

    "I would like to first mention however that we discovered this conversion behavior is not caused by TestComplete, but is actually caused by the data provider TestComplete uses. If this same provider is used somewhere else, such as visual studio, then the same conversion behavior occurs."

     

    To get around the conversion from the data provider, create a custom query so that the column uses the "Cast" command  As an example:

     

    SELECT

    CAST(dbo.Bit_Test.Changing_Value as int) as COLUMN_NAME

    FROM

    dbo.Bit_Test

6 Replies

  • tjohn's avatar
    tjohn
    Occasional Contributor

    Also, its a user defined specific test data that is used in the test case. i.e, the data is not generated using the Test Generator.

     

    Clarifying because i found the below information that specifies how boolean data can be set at the time of creating random test data. But the above question is specific to how can the SQL DB stored value be displayed "As-Is" without any boolean conversion in TestComplete DBTable.
    https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/generators/types/boolean.html

    • Herrington's avatar
      Herrington
      Occasional Visitor

      Zero is used to represent false, and One is used to represent true. For interpretation, Zero is interpreted as false and anything non-zero is interpreted as true. To make life easier, C Programmers typically define the terms "true" and "false" to have values 1 and 0 respectively.

      likewise, its a client characterized explicit test information that is utilized in the experiment. i.e, the information isn't produced utilizing the Test Generator.

      Explaining in light of the fact that I found the underneath data that indicates how boolean information can be set at the hour of making irregular test information. Yet, the above inquiry is explicit to by what method can the SQL DB put away worth be shown "With no guarantees" with no boolean transformation in TestComplete DBTable.

      • tjohn's avatar
        tjohn
        Occasional Contributor

        Thanks Herrington for the reply.
        But the question remains - How do set TestComplete to display the value that is stored in the Database (without interpreting it).