3

I want to automate testing of WCF Web Services(over TCP) using QTP's WebServices Add-In. However when I specify path of WSDL it gives me errors. Has anyone tried using QTP? or any other tool that I can use for testing?

Unmesh Gundecha
  • 560
  • 5
  • 10

3 Answers3

2

From what I know, QTP cannot be used for testing WCF services using NetTcpBinding. They should be using plain BasicHttpBinding for it to work.

cruizer
  • 6,103
  • 2
  • 27
  • 34
1

When I call a webservice I stipulate 3 manadatory parameters for QTP and then the parameters for the actual webservice itself. This works everytime (except wen the webservice is not running)

Here is an example of that:

'=============================================================================
' 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
'====================================================================
Helen
  • 87,344
  • 17
  • 243
  • 314
Dilip
  • 202
  • 6
  • 11
0

You can use QEngine. It is a good way to test your WCF and other types of service.

radu florescu
  • 4,315
  • 10
  • 60
  • 92
Phani
  • 1