> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-web/autify-university/foundation/step-groups/step-group-for-the-beginning-of-a-scenario.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# シナリオの冒頭で使うステップグループ

## どんな時に使うか

複数のシナリオで、テストの開始時に同じ処理を実行したい場合に有効です。一般的に、ログインや簡単なナビゲーションのために、このタイプのステップグループを使用するユーザーが見受けられます。

## シナリオの冒頭で使うステップグループを作成する

このタイプのステップグループの作成は、シナリオの作成と非常に似ています。左メニューの **ステップグループ** をクリックし、ステップグループのページに移動します。

そして、右上にある **新規ステップグループ** をクリックします。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-0b82ef535375d791120eb6602062a16e2b8a4074%2FScreen%20Shot%202022-04-09%20at%2012.42.39.png?alt=media)

このインターフェースは、シナリオと同じなので見慣れたものでしょう。編集ボタンをクリックすると、このステップグループの名前を変更することができます。また、ウィンドウサイズを変更することも出来ます（注意：シナリオとステップグループの一貫性が保たれるよう、両者のウィンドウサイズは同じにしておきましょう！）

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-bd933bc72db03d69fe2c52da70babbcfb44b38b5%2FScreen%20Shot%202022-04-09%20at%2012.45.18.png?alt=media)

開始したいURLを入力し、**レコーディングを開始** を押してください。あとは、シナリオを録画するのと同じ要領で、ステップグループをレコーディングしましょう（詳しくは、[シナリオをレコーディングする](https://help.autify.com/nocode-web/autify-university/foundation/creating-a-scenario.md)をご覧ください）。

## 既存のシナリオからステップグループを作成する

ゼロからシナリオをレコーディングできる一方、既存のシナリオを元にステップグループを作成したいケースもあるかもしれません。その場合も、以下の方法で簡単に実施することができます！

### シナリオ詳細画面から複製する

1. シナリオ詳細ページの右上にある三点ドットのメニューをクリックします。
2. `ステップグループとして複製する` をクリックします。

   ![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-40822acaf9da1fd7f313c04334fe683632822573%2FScreen%20Shot%202021-09-23%20at%2010.27.45.png?alt=media)

### シナリオ一覧画面から複製する

1. シナリオ一覧画面の右端にある三点ドットのメニューをクリックします。
2. `ステップグループとして複製する` をクリックします。

   ![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-20c039e51aded1552b7778d6d6394b11bb93fb1f%2Fimage\(6\).png?alt=media)

## ステップグループをシナリオの冒頭で使用する

新規シナリオを作成する際、URLを指定する代わりに **ステップグループを使用** を選択すると、記録したステップグループでシナリオを開始することができます。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-9c11bab517cee19ca6c43072ac56ca4d7b005cac%2FScreen%20Shot%202022-04-09%20at%2012.49.36.png?alt=media)

ドロップダウンメニューをクリックすると、作成したステップグループの一覧から選択するためのリストが表示されます。使用するステップグループを選択してください。ステップグループの最後まで自動的に進みたい場合は、そのオプションにチェックを入れたままにしてください。**レコーディング開始** を押すと、通常通りシナリオのレコーディングを進めることができます。

シナリオのレコーディングが終了すると、ステップグループがシナリオの最初に表示されます。このステップグループは、リストから選択することにより、他のステップグループと置き換えることができます。リスト内のステップグループ名の先頭の文字を入力すると、対応する候補が表示されます。

![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-627e3a602c466e853df102fab99b2c4f60b4870d%2FScreen%20Shot%202022-04-09%20at%2012.51.33.png?alt=media)

## 既存のシナリオのステップ1をステップグループに変更する

もし作成したステップグループを既存のシナリオのステップ1で利用したい場合は、以下の方法で変更することができます。

1. ステップ1の詳細を開き、「アクション」の下にあるプルダウンから **ステップグループを実行する** を選択します。

   ![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-3a2695ffc1bb2b6c565e8f3395eacc712e6a101c%2Fimage\(9\).png?alt=media)
2. ステップ1が「ページを表示する」から「ステップグループを実行する」に変わり、右側のドロップダウンメニューから使用する「ステップグループ」を選べるようになります。指定したい **ステップグループ** を選択後、「シナリオ」を保存すれば変更完了です。

   ![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-74c3aabda0bcbca0c2793d28583279b70050dd08%2Fimage\(11\).png?alt=media)

### 注意事項

* シナリオがステップグループから始まる場合、ステップグループとして複製することはできません。
* シナリオでデータ機能を使用している場合、コピーしたステップグループにはデータの内容が含まれません。
* ステップグループを含むテストを実行した場合、テスト結果のステップ数にはステップグループのステップ数が含まれることに注意してください。

詳しくは、以下のドキュメントもご覧ください。 [シナリオをステップグループとしてうまく複製できません。なぜですか？](https://help.autify.com/nocode-web/faq/faq-create-scenario/faq-step-group/i-cant-successfully-duplicate.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-web/autify-university/foundation/step-groups/step-group-for-the-beginning-of-a-scenario.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
