# Tags

There are three types of tags.

1. Case
2. Label
3. Annotation

### 1. Case

Case is a tag that is used to create a mock at a particular branching which needs to be covered in a request and does not let it get deduplicated if there is a version of the same request already present.

Case is created with the following syntax in source code.

```
htSdk.htTags.addCase({name: 'case name', value: 'case value'});
```

Case contributes to the deduplicating hash and essentially creates a new version of the request if the latter was already present. Typically this is used to create different versions of the same request to increase code coverage and cover all branching statements.&#x20;

Case can also be added in the root context of an application. If a case is added in root context then the same case is inserted in every incoming request when the server span is created.

Case is created at root context with the following syntax in source code.&#x20;

```
htSdk.htRootTags.addRootCase({name: 'case name', value: 'case value'});
```

### 2. Label

Label is a tag that is used to create a mock inside a particular route to avoid more versions of the same request due to difference in response schema. If there is a label inside a request, then only the cases and labels are considered for creating the deduplicating hash value thereby retaining the desired version of the request.

Label is created with the following syntax in source code.

```
htSdk.htTags.addLabel({name: 'label name', value: 'label value'});
```

Label can also be added in the root context of an application. If a label is added in root context then the same label is inserted in every incoming request when the server span is created.

Label is created at root context with the following syntax in source code.&#x20;

```
htSdk.htRootTags.addRootLabel({name: 'label name', value: 'label value'});
```

### 3. Annotation

Annotation is a tag that is used to create an unimportant mock inside a route to provide additional context to the request. This does not contribute to the deduplicating hash.

Annotation is created with the following syntax in source code.

```
htSdk.htTags.addAnnotation({name: 'annotation name', value: 'annotation value'});
```

Annotation can also be added in the root context of an application. If a annotation is added in root context then the same annotation is inserted in every incoming request when the server span is created.

Annotation is created at root context with the following syntax in source code.&#x20;

```
htSdk.htRootTags.addRootAnnotation({name: 'annotation name', value: 'annotation value'});
```


---

# 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/tags.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.
