cancel
Showing results for 
Search instead for 
Did you mean: 

DB Checkpoint - How to avoid True/False conversion

SOLVED
tjohn
Occasional Contributor

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.
1 ACCEPTED SOLUTION

Accepted Solutions
tjohn
Occasional Contributor

Re: DB Checkpoint - How to avoid True/False conversion

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

View solution in original post

6 REPLIES 6
tjohn
Occasional Contributor

Re: DB Checkpoint - How to avoid True/False conversion

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.ht...

Herrington
Occasional Visitor

Re: DB Checkpoint - How to avoid True/False conversion

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
Occasional Contributor

Re: DB Checkpoint - How to avoid True/False conversion

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). 

sonya_m
Community Manager

Re: DB Checkpoint - How to avoid True/False conversion

@tjohn In SQLServer, a column is of the bit type is a known way to store booleans so it seems logical that it is converted to true/false. The db checkpoint compares the stored baseline with the current state of the db. Even if the stored data is interpreted, the values of your DB at runtime will be interpreted in the same way and comparison should work.

If what you are after is the visual representation, please create a case with Support.


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
tjohn
Occasional Contributor

Re: DB Checkpoint - How to avoid True/False conversion

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

View solution in original post

sonya_m
Community Manager

Re: DB Checkpoint - How to avoid True/False conversion

Thank so much for sharing the solution @tjohn !


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors