0.14.5 • Published 6 years ago

testx-http-keywords v0.14.5

Weekly downloads
45
License
ISC
Repository
-
Last release
6 years ago

testx-http-keywords

A library that extends testx with keywords for sending basic http requests. This library is packaged as a npm package

How does it work

From the directory of the art code install the package as follows:

npm install testx-http-keywords --save

After installing the package add the keywords to your protractor config file as follows:

testx.keywords.add(require('testx-http-keywords'))

Keywords

KeywordArgument nameArgument valueDescriptionSupports repeating arguments
send http optional request method requestsend a http POST request and check if the response status code is 200
urlrelative url to which the request will be sentNo
methodrequest methodOptional. Valid values are get, post, put, delete, patch and head. Defaults to get. It is also possible to put the method in the keyword, as in send http post request or send http delete request instead of providing this argument.No
jsona valid JSON string that contains the body of the request, will make the Content-Type of the request 'application/json'Optional. Cannot use it together with body.No
bodya string that contains the body of the requestOptional. Cannot use it together with json.No
headerscustom headersOptional. Semicolon or new line-separated string of '='-separated key-value pairs. For example "User-Agent=testx;Something-Else='value with spaces'"No
expected status codeexpected status code of the responseOptional. The test will fail if the actual status code is different; defaults to 200No
expected responseexpected content of the responseOptional. The test will fail if the actual content (body) of the response is not equal.No
expected response regexa regex to match against the responseOptional. The keyword will try to match the provided regular expression against the content (body) of the response and will fail if there is no match; currently it is not possible to provide regex matching options.No
expected headerslist of expected response headersOptional. Same format as the headers parameter. The keyword will fail if not all of the expected response headers exist or if they have values different than the expected/specified onesble to provide regex matching options.No
json path/xpathexpected value at this json path or xpathOptional. Depending on the Content-Type header this argument will be treated as JSON path or an XPath. The argument name should be the actual path, i.e. "$.address.city" or "//address/city".Yes
expected missing json pathslist of expected missing json pathsOptional. The keyword will fail if one of the expected response headers existNo
expected present json pathslist of expected present json pathsOptional. The keyword will fail if one of the expected response headers does not existNo
0.14.5

6 years ago

0.14.4

6 years ago

0.14.3

7 years ago

0.14.2

7 years ago

0.14.1

7 years ago

0.14.0

7 years ago

0.13.1

7 years ago

0.13.0

7 years ago

0.12.0

7 years ago

0.11.1

7 years ago

0.11.0

7 years ago

0.10.0

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago

0.8.1

7 years ago

0.8.0

8 years ago

0.7.0

8 years ago

0.6.0

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago