ht1-init
v1.0.4
Published
## Overview The HyperTest Installer is a CLI tool to help you set up your project with the necessary scripts, dependencies, and configurations for HyperTest. It verifies and updates your `package.json` and creates required configuration files for HyperTes
Downloads
7
Readme
HyperTest Installer
Overview
The HyperTest Installer is a CLI tool to help you set up your project with the necessary scripts, dependencies, and configurations for HyperTest. It verifies and updates your package.json
and creates required configuration files for HyperTest.
Features
- Verifies and adds necessary scripts to
package.json
. - Verifies and adds required dependencies and devDependencies.
- Creates and updates
.htTestConf.js
configuration file. - Updates
.npmrc
with HyperTest NPM token.
Usage
- Make sure you are in the root directory of your project where
package.json
is located. - Run the installer:
npx ht1-init
Prompts
The installer will guide you through a series of prompts:
Confirm if you are in the root directory of your project. Confirm if you have a HyperTest NPM token. Enter your HyperTest NPM token. Enter the version of @hypertestco/node-sdk. Enter the version of @hypertestco/ht-cli.
Commands
The installer will prompt you to confirm if you are in the root directory of your project and if you have a HyperTest NPM token. It will then proceed with the following steps:
Verify and add necessary scripts to
package.json
:run-test
:htcli start-new-test --config-file-path .htTestConf.js
run-test-cov
:npx --yes nyc@latest npm run run-test
run-test-cov-html
:npx --yes nyc@latest --reporter html npm run run-test
htcli-v
:htcli -v
Verify and add required dependencies:
@opentelemetry/exporter-trace-otlp-grpc
@opentelemetry/sdk-node
@hypertestco/node-sdk
Verify and add required devDependencies:
@hypertestco/ht-cli
Create or update the
.htTestConf.js
configuration file.Update the
.npmrc
file with your HyperTest NPM token.
Error Handling
If the installer encounters an error, it will display an appropriate error message. If you forcefully close a prompt (e.g., using Ctrl+C
), it will display a warning message and exit.
Contact
If you have any questions, issues, or feedback, please reach out to the HyperTest team.