> 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/advanced/best-practice/best-practices-for-creating-and-using-step-groups.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# ステップグループを作成・利用する上でのベストプラクティス

## どんなものをステップグループにすると良いのか？

「何度も繰り返し利用するステップ」や、「複数のシナリオで共通している部分」を切り出してステップグループにまとめましょう。シナリオの作成・管理をよりスムーズに効率的に行うことができるようになります。

ステップグループの概要と基本的な使い方については[こちらのヘルプページ](https://help.autify.com/nocode-web/autify-university/foundation/step-groups.md)をご確認ください。

## ステップグループを作成・編集する際の注意点

* 可能な限り短く、簡潔なステップグループにしましょう。
* ステップグループ名はわかりやすい命名規則で管理しましょう。また、ラベルや説明も必ず記載するようにルールを作ることで、誰がみてもどのような処理がなされるのかイメージできる形式を意識しましょう。
* 再利用されるかどうかわからないようなステップグループを、先回りして作ってしまうことは避けましょう。確実に再利用される且つそれが必要になったタイミングに作成すれば問題ありません。

## ユースケース

* ログイン/登録/退会など、テストの中で繰り返し使うステップを見つけてステップグループにまとめましょう。また、ユーザー権限が分かれているような場合は、権限ごとに分けたログインのステップグループ（例：一般会員/プレミア会員 等）を作成することでより効率的なシナリオ作成・管理が期待できます。

***

* 例えば、フォームにデータを入力するようなステップでもステップグループは有効です。会員情報入力やデータ登録のような、複数のシナリオで繰り返し利用されるステップをまとめておくことで、効率的にシナリオ作成ができます。

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

***

* テストに必要なデータの作成/削除もステップグループにしておくことで、冒頭と末尾にステップグループを追加するだけでテストの準備ができます。例えば、シナリオ冒頭でユーザーを作成するステップグループを利用し、テストが終わったら、そのユーザーを削除するステップグループを利用する という流れになります。 このように、 \[データ登録のステップグループ] + \[検証観点] + \[データ削除のステップグループ] とすることで共通化できる部分をステップグループに切り出して複数のシナリオを用意することも可能です。

  ![](https://50135409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fof7cb8AGXhWvWThq3R0w%2Fuploads%2Fgit-blob-7a0a36da6b8613f6744b17ecd7477b33dd7f62d4%2Fpre%3Apost%20process.png?alt=media)

***

* 高度な利用事例として、ステップグループ間での値の受け渡しも可能です。ステップグループ内でJSステップを利用して値を取得し、その取得した値を別のステップグループ内で利用することが可能です。

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

***

* エラーなどの異常系のテストについても、待機ステップやJSステップの画面リロードを組み合わせることで、「要素が正しく表示されていないケース」を考慮したシナリオ作成ができるケースがあります。


---

# 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/advanced/best-practice/best-practices-for-creating-and-using-step-groups.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.
