mirror of
https://github.com/hoppscotch/hoppscotch
synced 2024-11-23 15:48:33 +00:00
.. | ||
bin | ||
src | ||
.gitignore | ||
.prettierrc | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
jest.config.ts | ||
jest.setup.ts | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.json | ||
tsup.config.ts |
Hoppscotch CLI ALPHA
A CLI to run Hoppscotch test scripts in CI environments.
Commands:
hopp test [options] [file]
: testing hoppscotch collection.json file
Usage:
hopp [options or commands] arguments
Options:
-v
,--ver
: see the current version of the CLI-h
,--help
: display help for command
Command Descriptions:
-
hopp -v
/hopp --ver
- Prints out the current version of the Hoppscotch CLI
-
hopp -h
/hopp --help
- Displays the help text
-
hopp test [options] <file_path>
- Interactive CLI to accept Hoppscotch collection JSON path
- Parses the collection JSON and executes each requests
- Executes pre-request script.
- Outputs the response of each request.
- Executes and outputs test-script response.
Options:
-e <file_path>
/--env <file_path>
-
Accepts path to env.json with contents in below format:
{ "ENV1":"value1", "ENV2":"value2" }
-
You can now access those variables using
pw.env.get('<var_name>')
Taking the above example, `pw.env.get("ENV1")` will return `"value1"`
Install
Install @hoppscotch/cli from npm by running:
npm i -g @hoppscotch/cli
Developing:
- Clone the repository, make sure you've installed latest pnpm.
pnpm install
cd packages/hoppscotch-cli
pnpm run build
sudo pnpm link --global
- Test the installation by executing
hopp
Contributing:
To get started contributing to the repository, please read CONTRIBUTING.md