SOAP 负载测试允许您在用户负载下测试基于 SOAP 的 Web 服务的性能。

配置测试

您可以使用 SOAP 信封手动配置 SOAP 请求,也可以单击页面顶部的“使用 WSDL”按钮使用 SOAP 向导。

HTTP/SOAP 向导允许您指定 WSDL URL,并允许您在继续之前选择要测试的有效参数。

URL

输入要执行测试的页面的 URL。 指定包括 HTTP 在内的整个 URL。 例如,”http://www.example.com/wsdl.asmx?WSDL”。

时间验证阈值(秒内)

Enter the number of seconds the system should wait for a response from the target resource before returning an error. If this is left blank the default timeout is 120 seconds.

SOAPAction

SOAPAction HTTP 请求标头字段可用于指示 SOAP HTTP 请求的意图。 该值是标识意图的 URI。 SOAP 对 URI 的格式或特异性没有限制,或者它可解析。 发出 SOAP HTTP 请求时,HTTP 客户端必须使用此标头字段。

服务器(如防火墙)可以使用 SOAPAction 标头字段的状态和内容来适当筛选 HTTP 中的 SOAP 请求消息。 空字符串的标头字段值 (””) 表示 SOAP 消息的意图由 HTTP 请求-URI 提供。 没有值表示没有迹象表明消息的意图。

发布 XML

输入 XML 请求的正文。

内容验证

Content Validation Keywords are used to ensure that the expected content was loaded onto a web page. In the Keyword fields, you can specify one or more words or phrases that you wish to search for in the web page content.  If the expected keywords are not found, the task will return an error.

You can enter multiple strings into the keyword fields.  The values you enter can be separated by logical expressions as follows:

{[("keyword1"&"keyword2")|!"keyword3"]}

Where:
{[ – keyword expression start;
]} – keyword expression end;
() – grouping brackets;
& – logical AND;
| – logical OR;
! – logical NOT;
“string” – a keyword.

A successful keyword expression must include the start and end brackets as follows:

{["keyword"]}

基本身份验证

The HTTP authentication protocol is used to allow users to access content on some websites.

The following authentication schemes are available:

  • Basic Authentication: This method encodes the username and password in base64 and sends them in the request header. It’s simple but not secure unless used with HTTPS.
  • Digest Authentication: This scheme hashes credentials using a nonce (a random value) before sending them over the network, providing better security than Basic Authentication by preventing replay attacks.
  • NTLM Authentication: A challenge-response mechanism developed by Microsoft, NTLM is used for securing credentials in Windows environments. It provides strong security by using multiple hashing and challenge-response protocols.

Once provided, login credentials will be passed along with the request header to the web server.

  • Username: contains a username for HTTP/S  authentication.
  • User Password: contains a password for HTTP/S authentication.

Do not confuse HTTP authentication with other authentication schemes such as Bearer Authentication that involves bearer tokens and OAuth 2.0 that uses access tokens.

Read the articles on Basic Authentication Username and Password and Monitoring OAuth 2.0-based APIs for more information.

The default User-Agent header is set to:

User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) DMBrowser/2.1 (SV)

However, the user-agent string can be replaced with any other string. To do this, add a custom header with the name “user-agent” and the specific value needed.

DNS 选项

The DNS Options feature allows users to choose how domain name server (DNS) requests are conducted during a test.

The Custom DNS Hosts section allows setting up the mapping of IP addresses to hostnames. IPv6 and IPv4 DNS resolutions are supported.

To specify the mapping, enter the IP address and the hostname in the corresponding fields.

Examples:

192.168.107.246   example.com user.example.com userauth.example.com tools.example.com
192.168.107.246   example.com
192.168.107.246   user.example.com
192.168.107.246   userauth.example.com

See also: DNS Mode Options.

请注意,LoadView 现场代理不支持该选项。 若要查找有关如何为现场代理设置自定义 DNS 主机的详细指南,请访问知识库的 如何设置自定义 DNS 主机以进行使用现场代理进行负载测试 一文。

忽略错误代码

If you want to ignore an error with a specific code and type while testing, you can configure the Ignore Error Codes option in the test target settings. If the system detects a response with the specified error type and code, the response will be considered as successful and its status will be changed to OK. Note that ignored errors will not be reflected on the reports and can’t be tracked down.

You can find a comprehensive list of Error Codes in the HTTP Status Codes List | HTTP Error Codes Explained article of this wiki.