---
search: false
---

# Templates

<div class="view-markdown-wrapper">
<ViewMarkdown />
</div>

::: warning LEGACY — Shiplight Cloud v1
This page documents **Shiplight Cloud v1** (`app.shiplight.ai`), which is no longer the
current product. For the current cloud platform, see [Shiplight Cloud](/cloud_v2/).
:::

> **Note:** Templates were previously called "Reusable Groups" in the UI. The functionality remains the same - only the name has changed to better reflect their purpose as reusable test patterns.

Templates allow you to save common test workflows and share them across your organization. Create them once, use them everywhere, and update them all at once.

## Table of Contents

1. [What is a Template?](#what-is-a-template)
2. [Creating a Template](#creating-a-template)
   - [From the Templates Library](#from-the-templates-library)
   - [From a Test Case](#from-a-test-case)
3. [Using a Template](#using-a-template)
4. [Editing a Template](#editing-a-template)
   - [In the Templates Library](#in-the-templates-library)
   - [In the Test Editor](#in-the-test-editor)
5. [Managing Templates](#managing-templates)
6. [Using Templates as Hooks](#using-templates-as-hooks)
7. [Next Steps](#next-steps)

## What is a Template?

A **Template** (formerly called Reusable Group) is a shared collection of test steps that can be inserted into any test case in your organization. When you update the Template, all tests using it are automatically updated.

**Key Benefits:**

- Define once, use everywhere - No need to recreate common workflows
- Update all tests at once - Change the template, update all tests
- Share with your team - Make your best patterns available to everyone
- Consistency - Ensure the same logic across all tests
- Cleaner tests - Collapse complex workflows into a single reference

## Creating a Template

There are two ways to create a Template:

### From the Templates Library

1. Navigate to **Templates** in the sidebar
2. Click **New** to open the template editor
3. Enter a name for the Template
4. Add a description (optional)
5. Add steps using the step editor
6. Click **Create**

### From a Test Case

Convert an existing Group to a Template:

1. Create a **Group** with your test steps (or select an existing one)
2. Click the **...** menu on the Group
3. Select **"Save as Template"**
4. Enter a name for the Template
5. Click **Save**

The Template is now available to everyone in your organization!

## Using a Template

Insert a Template into any test case:

1. Click **"Add a new step"** where you want to insert the template
2. Select **"Template"** from the dropdown
3. Choose from the list of available Templates
4. Select how you want to insert the template:
   - **Copy**: Insert the template as an independent group.  
     After insertion, it becomes a regular group. Changes to the template will not affect this group, and changes made here will not update the template.
   - **Link**: Insert the template as a linked group that stays in sync with the template.  
     Any changes made to the steps will update the template accordingly.
5. After insertion, the template appears in the test:
   - **Copy** appears as a regular group.
   - **Link** appears as a linked template.
6. Click to expand or collapse to view the steps inside.

## Editing a Template

### In the Templates Library

Edit a Template directly from the library:

1. Go to **Templates** in the sidebar
2. Find your Template in the list
3. Click **...**, then select **Edit** to open the template editor
4. Update the **name**, **description**, or **steps**
5. Click **Save**

If the template is used by test cases, you'll see a confirmation before saving.

> **Note:** You cannot test templates from the library. To test your changes, use the template in a test case and run it there.

### In the Test Editor

You can also edit a Template from within any test case:

1. **Expand the Template** to see its steps
2. **Edit the steps** as needed (add, remove, modify)
3. **Save your test case**

> ⚠️**Important:** Changes made in either location will update the template and **affect all other test cases using this Template**.

## Managing Templates

Navigate to **Templates** in the sidebar to access your organization's Templates library.

From the library you can:

- View all Templates in your organization
- See usage count for each template
- See when it was last updated and by whom
- Create, edit, or delete templates

## Using Templates as Hooks

Templates can be configured as **hooks** to run automatically before or after your tests.  
See [Hooks](/integrations/hooks) for detailed configuration options.

## Next Steps

- [Learn about Hooks](/integrations/hooks) - Run templates automatically before/after tests
- [Learn about Functions](./functions) - For programmable test logic
- [Explore Variables](./variables) - Make your templates more flexible
- [Test Editor Overview](/cloud_legacy/test-editor/overview) - Master the test editor
