Testing WCF Web Service Using QTP

I want to automate testing WCF web services (over TCP) using the QTP WebServices add-in. However, when I specify the path to the WSDL, it gives me errors. Has anyone tried to use QTP? or any other tool that I can use for testing?

+3
source share
3 answers

From what I know, QTP cannot be used to test WCF services using NetTcpBinding. They must use a simple BasicHttpBinding for it to work.

+2
source

-, 3 QTP, -. ( , - )

:

'=============================================================================
' Define WebService
qtpP1 = "wsdl:=http://172.16.69.84:8080/testframeworkwebapp/services/STFSQLExecutionService?WSDL"
' Define service & port
qtpP2 = "service:=GenericSQLExecutorService"
qtpP3= "port:=STFSQLExecutionService"
' Define Webservice calling parameters
wsP1 = "Select Count(*) From PERSON_TABLE"

'====================================================================
' Call to the WebService
executeSQLByDBName = WebService(qtpP1, qtpP2, qtpP3).executeSQLByDBName(wsP1)

If WebService(qtpP1, qtpP2, qtpP3).GetLastError > "" Then
  MsgBox "WebService Issue"
Else
  MsgBox "WebServices Call Worked OK"
End If
'====================================================================
+1

You can use QEngine. This is a good way to check your WCF and other services.

0
source

Source: https://habr.com/ru/post/1704875/


All Articles