我想使用QTP的WebServices添加组件来自动化测试WCF Web服务(通过TCP)。然而,当我指定WSDL文件的路径时,它会给我报错。是否有人尝试过使用QTP?或者有其他工具可以用于测试吗?
我想使用QTP的WebServices添加组件来自动化测试WCF Web服务(通过TCP)。然而,当我指定WSDL文件的路径时,它会给我报错。是否有人尝试过使用QTP?或者有其他工具可以用于测试吗?
当我调用Web服务时,我为QTP指定了3个必需参数,然后是实际Web服务的参数。这总是有效的(除非Web服务没有运行)
以下是一个示例:
'=============================================================================
' 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
'====================================================================