APIC Command line interface (apic-cli)
Last updated
Was this helpful?
Last updated
Was this helpful?
is a command line utility that allows you to test your Test Suits created with apic from a command line or with a node js app. With the help of apic-cli you can run your API test suites from inside your Continuous Integration / Continuous Deployment (CI/CD) environments.
apic-cli is an npm package hence you will need to have NodeJs installed to test your APIs with APIC. Follow the to install the version of NodeJs applicable for your environment.
Install the apic command line utility apic-cli globally with the following command.
if you want to use apic from the command line run
Once installed you can runapic-cli -h
to view all available commands.
Command:
run|r <suit> [options]
Run apic Test Suit or an entire Test Project
Options
-e, --environment <path>
: Specify a URL or Path to an apic environment file.
-r, --reporters <reporters>
: Comma separated list of reporters to use (without any space)
--reporters-junit-path <path>
: Path to write the junit report file
-d , --responseData
: if specified, response data will be logged in the cli reporter
-h, --help
: output usage information
Example:
If you want to use it with a node js application add it to your project by running
Next add below code to your script file.
Look in the for a sample node js app to run your Test Suit with apic.