
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Hyperscript is a tool for testing HTTP requests with flexible configuration and validation.
Install with pip:
pip install hyperscript-cli
Create a YAML file (config.yaml
) for your tests. Example:
global:
url: https://freetestapi.com
run:
- name: Get All Cars
path: /api/v1/cars
expect:
contentType: application/json
status: 200
- name: Get Single Car
path: /api/v1/cars/1
expect:
contentType: application/json
status:
- value: 200
- value: 201
contains:
id: 1
equalTo:
make: Toyota
model: Corolla
lessThan:
price: 30000
greaterThan:
year: 2010
body:
make: Toyota
model: Corolla
color: Silver
You can use environment variables in your configuration. For example, use {{VARIABLE_NAME}}
syntax to reference environment variables.
Set environment variables before running your tests:
export BASE_URL=https://freetestapi.com
export CAR_ID=1
Update config.yaml
to use these variables:
global:
url: "{{BASE_URL}}"
run:
- name: Get Single Car
path: /api/v1/cars/{{CAR_ID}}
expect:
contentType: application/json
status:
- value: 200
- value: 201
Run tests with the hyperscript
command:
hyperscript path/to/config.yaml
config_file
: Path to the YAML configuration file. Default is hypertest.yml
.
Example:
hyperscript path/to/config.yaml
--skip-error
: Continue with the next test on error.
Example:
hyperscript path/to/config.yaml --skip-error
--verbose
: Enable detailed logging for more comprehensive output.
Example:
hyperscript path/to/config.yaml --verbose
--concurrency
: Set the number of concurrent tests to run. If not specified, tests will run sequentially.
Example:
hyperscript path/to/config.yaml --concurrency 5
Fork the repository and submit a pull request with your changes.
MIT License. See the LICENSE file.
For questions, email happer64bit@gmail.com.
FAQs
Powerful HTTP Request Tester
We found that hyperscript-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.