welcome

Introducing vREST NG CLI – A command line partner of vREST NG Application

Hi friends!!! Today, I would like to introduce vREST NG CLI which is the command line partner of vREST NG Application. With vREST NG CLI, you will be able to execute your API testing on the command line as well. This api testing uses the same runner component as used by the vREST NG Application itself. So, whatever works in the vREST NG UI Application will seamlessly work on the command line as well using vREST NG CLI without any further hassle. API testing tools provide beautiful and usable reports to debug your API failures quickly.

You may download api automation testing tools from this github link. vREST NG CLI provides the following two commands:

1. Run Command:

Run command will help you in the following tasks:

run-command

You can execute your test cases on the command line. Simply provide the vREST NG project directory path to the CLI to execute the tests. For api automation testing detailed instructions, please follow our guide link.

$ vrest-ng-cli run --projectdir=<VREST_NG_PROJECT_DIR_PATH>

You can monitor your APIs health at specific intervals by linking this command with any third party schedular or cron utility.

You can validate your application builds by integrating this api testing command with any CI/CD servers like Jenkins, TeamCity, Azure Devops, CircleCI, Bitbucket pipelines etc.

Run command provides the following loggers to provide the detailed execution report:

execution-report

1. Console Logger: This logger will output the test execution log on the console in a beautiful way. It will print the test summary, assertions results and diff report in case of test failure on the console.

Execution on the Command Line: If you execute the tests on the command line then vrest-ng-cli provides the report in the following way:

command-line

Execution in Jenkins: The same console report is also available in any CI/CD Servers like Jenkins server as shown below:

jenkins

2. XUnit Logger: This XUnit logger will generate the xml report which can be used in any CI/CD servers like Jenkins to publish the report. The published reports using xunit logger provides the following two types of report:

  1. Failed Test Cases List Report
  2. Individual Test Case Failure Report

3. JSON Logger: This logger in api tools will generate the report in JSON format which you may consume by any other tool/script.

4. CSV Logger: This logger will generate the report in CSV format. So that you can visualise the report with Microsoft Excel Sheet, Numbers etc.

2. Import Command

command

The Import command in the API testing tools will help you in achieving the following tasks:

It is helpful in importing tests from various sources like vREST Cloud, Postman, Swagger.

It can also be used in syncing your tests automatically whenever there is some change in swagger schema file.

One real world use case of import command is, suppose you are maintaining the API specifications in swagger files and your specs keeps changing over a period of time. So, instead of updating the schema definitions manually for your API tests, you may schedule the import command which automatically updates your tests by re-importing the swagger files at scheduled intervals.

So, in this way, you may use vrest-ng-cli utility to continuously validate your application or sync your test cases with swagger definitions changes.

If you are facing any issues related to API Automated testing in your organization, then do contact us. We will arrange the live meeting to discuss your needs and will also provide you the demo of our product vREST NG showcasing its capabilities.

If you like this post helpful then do like, comment and share with your friends and colleagues. You can connect with us, follow us for amazing articles on API Test Automation and feel free to message us if you would like to discuss anything.

Have any queries?

Please send a mail to support@optimizory.com to get in touch with us.