add http parameter

GETリクエストにキーと値のペアを含むパラメータを追加します。このパラメータは、リクエストURLのクエリー文字列に付加されます。パラメータは ? で始まり、複数のパラメータは & で区切られます。たとえば、次のURLのパラメータは ?id=123&name=John です: http://example.com/reseource/path/search?id=123&name=John
名前説明タイプ修飾子
key

パラメータの名前です。

Stringなし
value

(任意)パラメータの値です。

Stringなし
なし
このアクションは、次のプロジェクト項目で使用できます: テストモジュールおよびユーザー定義アクションです。
次の設定はこのアクションに適用可能です:  remove double quotes from cells.
  • オプション1: add http parameterを使用して、GETリクエストに名前/値のペアを追加します。
                    
                        create http request				
    &nbsp				
    	key	value		
    add http parameter	firstName	John		
    add http parameter	lastName	Doe		
    &nbsp				
    	uri	method	variable	expected code
    send http request	http://www.acme.com/phonebook/UserDetails	GET	>>response	200
                    
                
  • オプション2: send http request を使用して、GETリクエストのURIに名前/値のペアを追加します。
                    
                        create http request				
    &nbsp				
    	uri	method	variable	expected code
    send http request	http://www.acme.com/phonebook/UserDetails?firstName=John&lastName=Doe	GET	>>response	200
                    
                
  • このビルトインアクションを呼び出す前に、HTTPリクエストは create http request を使ってインスタンス化する必要があります。
  • GETリクエストのURIに複数の値のパラメータを追加する場合、テスト手順で複数の add http parameter を宣言します。これらの名前/値ペアは等号で結合され、異なるペアはアンパサンドで区切られます。例えば: /test/demo_form.asp?name1=value1&name2=value2.
  • また、GETリクエストに名前/値のペアを追加するためにこのビルトインアクションを使用したくない場合、名前/値のペアをURIに直接追加し、ビルトインアクション send http request を使用してサーバーに対して完全なGETリクエストを送信します。( を参照してください)
  • このアクションは修飾子 <ignore> をサポートしています。引数のいずれかの値として文字列 <ignore> が含まれているか、或いはどの引数かが <ignore> に評価される式を含んでいる場合、そのアクションは実行中にスキップされます。

Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400