Edit

Running a Specification

Setup

macOS

JavaScript

VS Code

Modify

Now that you successfully initialized a Gauge project with the JavaScript template, we can look at running a specification using the example specification in the test folder.

A test specification (spec) is a detailed statement of what will be tested. In Gauge, these are written in a .spec file. To learn more about how specifications work you can look at the overview section.

Running a Specification using VS Code

Step 1: Open Specification

Open the example spec. The Gauge specification file is present under /specs/example.spec

Open example.spec file

Step 2: Run Specification

Run your Gauge specs in VS Code by choosing the option to Run Spec

VS Code JavaScript run code lens

You’ll get immediate feedback in the output about what got executed.

VS Code JavaScript execution console

Now that you have successfully run a Gauge specification, you can go ahead and view the report from VS code.