npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ictu/testx-http-keywords

v0.14.7

Published

Keywords to send simple http requests and check the responses using the testx library.

Downloads

1,052

Readme

Build Status

testx-http-keywords

A library that extends testx with keywords for sending basic http requests. @ictu/testx is a fork maintained and used by ICTU (www.ictu.nl). 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 @ictu/testx-http-keywords --save

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

testx.keywords.add(require('@ictu/testx-http-keywords'))

Keywords

| Keyword | Argument name | Argument value | Description | Supports repeating arguments | | ---------------------- | ------------- | --------------- |------------ | ---------------------------- | | send http [optional request method] request | | | send a http POST request and check if the response status code is 200 | | | | url | relative url to which the request will be sent || No | | | method | request method | Optional. 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 | | | json | a 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 | | | body | a string that contains the body of the request | Optional. Cannot use it together with json. | No | | | headers | custom headers | Optional. Semicolon or new line-separated string of '='-separated key-value pairs. For example "User-Agent=testx;Something-Else='value with spaces'"| No | | | expected status code | expected status code of the response | Optional. The test will fail if the actual status code is different; defaults to 200| No | | | expected response | expected content of the response | Optional. The test will fail if the actual content (body) of the response is not equal. | No | | | expected response regex | a regex to match against the response | Optional. 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 headers | list of expected response headers | Optional. 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/xpath | expected value at this json path or xpath | Optional. 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 paths | list of expected missing json paths | Optional. The keyword will fail if one of the expected response headers exist | No | | | expected present json paths | list of expected present json paths | Optional. The keyword will fail if one of the expected response headers does not exist | No |