0

I am running a series of webservice tests using jmeter and I've run into a couple problems regarding assertions. Basically in one of my requests an error classification needs to be specified ( variable ${CLASS} ), and that request is supposed to return info on subscribers and devices that have that specified error. I want to assert that the classification that is returned with the other info is NEVER NOT what was inputed. i.e. classification="${CLASS}" . I'm pretty sure I'd like to use a RegEx along with jmeter's 'not contains' option in the assertion to make this happen, but I'm not too sure how to make it work. Any help would be greatly appreciated!

4

1 に答える 1

0

あなたのコメントから、複数のアサーションを使用することをお勧めします。複数のアサーションがある場合、親リクエストはすべてがパスした場合にのみパスし、いずれかのアサーションが失敗状態を返すとすぐに失敗します。

例えば。「マイナー」が見つかった場合に合格ステータスを返すものと、「メジャー」が見つからない場合に合格を返す別のステータスを返すことができます。[パターン マッチング ルール CONTAINS] チェックボックスを選択せず​​に [パターン マッチング ルールを含む] を選択し、テストするパターンとして表示したくないテキストを単純に含めることで、テキストが見つかった場合にアサーションが失敗することを指定します。

同じアサーションに複数のテキスト文字列を含めることもできますが、このようにすべて同じスコープとパターン マッチング ルールを使用します。

于 2012-05-26T00:27:57.003 に答える