Is it possible to compare the actual result with the database using QTP

Questions by subhashini.lutimath   answers by subhashini.lutimath

Showing Answers 1 - 18 of 18 Answers

swapna

  • Jan 5th, 2007
 

    yap,
by inserting database check point we can compare expected with actual result in database.

  Was this answer useful?  Yes

Hi,

Well u can, it depends on the approach u use the qtp.

We are using key word driven approach, as this approach we read the Actiual result from the application & compare that with the database.

Database check point is used to check only the database.

But when it comes to compare the actual value from the application, then u can use out put value to read the  Actual value & compare it with the database.

Regards

Naresh J

  Was this answer useful?  Yes

megana

  • Jan 10th, 2007
 

Naresh your answer was very impressive.

so could please tell me brifely. I mean first we use Db check point after that we use outpit value.

Is my assumption right. If not could you please clarify.

Thanks

Megana

  Was this answer useful?  Yes

Hi Megana,

Let me tell u,  if the actual value u want to compare with the database is stored in a text box.

First Output that value using text out put value. Store it in a environment variable.

Next fetch the value from database using any sql command store that in an environment variable.

Now compare these two values.

Regards

Naresh J

  Was this answer useful?  Yes

ankush

  • Jan 29th, 2007
 

Hi neeraj, Lets suppose that I am entering a value in a textbox and after clicking Ok I want to check that whether that Value has been inserted in that textbox or not then.. what you suggest that should we use a Database checkpoint or Output value method. Currently I apply both of them whenever I want but i Dont know the exact difference. Also Can you please mention some scenario in which DataBase checkpoint is mostly used.

  Was this answer useful?  Yes

Lokesh Tewathia

  • Jan 31st, 2007
 

This code can be used for DB connectivity and verification of data from DBSet



Conn=CreateObject("ADODB.Connection")
Set rs =CreateObject("ADODB.Recordset")conn.open= "DSN=;UID=;PWD=;DATABASE="



If Conn.State <>1 Then
Reporter.ReportEvent 1, "DB Connect", "Connection to Server Not established"
Conn = Nothing
exit
run
Else
Reporter.ReportEvent 0, "DB Connect", "Connection to Server established"
End If



rs.Open "Select * From tablename WHERE = " & , Conn



Do While Not rs.EOF
Row = Row + 1
rs.MoveNext
Loop



rs.close

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions