Ich versuche HTTP-Antwortcodes in JMeter zu bestätigen. Ich denke, das ist wirklich einfach, aber ich stieß auf ein Problem, das ich nicht beheben kann.JMeter kann die HTTP-Antwort nicht bestätigen Code 423
Mein Server kann 2 Antwortcodes zurückgeben: 200 und 423. Es gibt kein Problem mit 200, es funktioniert einfach, aber ich kann 423 nicht behaupten, ich weiß nicht warum.
Ich versuchte Antwort Behauptung mit den folgenden Konfigurationen:
Field Test: Response Code, Pattern Matching-Regeln: Enthält
Muster zu testen: 200 - arbeitet 423 - nicht funktioniert 200 | 423-200 Werke, 423 nicht funktioniert (wtf?)
ich habe auch versucht Beanshell Assertion mit
Failure = !(ResponseCode.contains("200") || ResponseCode.contains("423"));
Es funktioniert auch nicht. Auch ich habe versucht, mit der Antwortnachricht zu entsprechen, um "Gesperrt" zu enthalten - funktioniert nicht. Die Antwort des Servers sieht wie folgt aus:
Thread Name: 10 Users, 100 Repeats 1-10
Sample Start: 2017-05-19 13:06:09 MESZ
Load time: 33
Connect Time: 2
Latency: 33
Size in bytes: 333
Sent bytes:768
Headers size in bytes: 333
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""):
Response code: 423
Response message: Locked
Response headers:
HTTP/1.1 423 Locked
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
X-Application-Context: application:capacitytest
Content-Length: 0
Date: Fri, 19 May 2017 11:06:08 GMT
Server: Not_available
HTTPSampleResult fields:
ContentType:
DataEncoding: null
Der Antwortcode aus einem Grund in Sampler Ergebnis blau markiert. Ich weiß nicht warum. Ich protokolliere auch den Antwortcode über Beanshell PostProcessor. Es ist 423 ...
Endlich frage ich hier nach Ihrer Hilfe. Ich habe keine Ahnung, was das Problem ist oder sein könnte. Vielen Dank im Voraus.
Vielen Dank! Diese Ignorier-Status-Box, die ich verpasst habe, war mein Problem. – DerKnecht