# Continuous Coverage

Continuous Coverage helps you measure the coverage of requests made to your application in real time. Once you start your app, Hypertest will begin tracking coverage from the beginning.

&#x20;This feature supports two modes:

* **RECORD**
* **DISABLED**

{% hint style="warning" %}
Make sure you go through the steps to add nyc to your project [here](https://docs-v2.hypertest.co/user-guides/node.js-sdk/code-coverage-based-features) before this.
{% endhint %}

### Steps to Measure Continuous Coverage

Follow these steps to enable and measure Continuous Coverage using Hypertest:

{% hint style="warning" %}
Make Sure you set the [Git Commit Hash](/user-guides/node.js-sdk/set-git-commit-hash.md) when measuring continuous coverage. It helps in accurately mapping the coverage data to the correct code version.
{% endhint %}

#### Step 1: Configure Continuous Coverage in Your App

Add the following code snippet to your app's `index.js` file:

```javascript
// App's index.js
htSdk.measureContinuousCoverage({
  backendBaseUrl: '<your-hypertest-backend-url>',
  htExtraHeaders: {},
  buildId: '',
  serviceId: '<your-service-identifier-from-dashboard>',
  refreshIntervalInSec: 60 // Default interval is 60 seconds
});
```

#### Step 2: Access the Hypertest Dashboard

1. Navigate to the **Hypertest Dashboard**.
2. Select your service and go to the **Continuous Coverage** page.
3. Click on the **Measure Continuous Coverage** button to start tracking.

*Example:*

<figure><img src="/files/SCoATm2AEEGViVuJ5wY5" alt=""><figcaption></figcaption></figure>

#### Step 3: Start Your App with NYC

Update the `start` command in your `package.json` to run your app with NYC:

```json
// App's package.json
{
  "scripts": {
    "start": "nyc <your app start command>"
  }
}
```

#### Step 4: View Real-Time Coverage

Once the app is running, Hypertest will update the coverage data automatically at intervals defined by `refreshIntervalInSec` (default: 60 seconds).

You can monitor the results on the Hypertest Dashboard.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-v2.hypertest.co/user-guides/node.js-sdk/code-coverage-based-features/continuous-coverage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
