例如,我有网址列表。 每个URL都应在HTML正文的头部包含以下参数:
<link rel="canonical" href="http://example.com/xxx/yyy/zzz/">
“href”中显示的参数,与请求的确切URL重复。
我应该使用什么类型的断言以及如何配置它以自动检查7k +的URL?
主要思想是检查响应代码(它应该是200),并且“href”中的参数与URL具有相同的值。
答案 0 :(得分:1)
Extract URL
Add Regular Expression Extractor as a child of the request (or if you have a lot of requests put it on the same level as the requests) and configure it as follows:
Perform response validation.
Add Response Assertion (the same scope as the Regular Expresion Extractor) and configure it as follows