> 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/faq/faq-autify-connect/does-autify-connect-support-localhost-testing.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Autify Connectでlocalhostのテストはサポートされていますか？

はい、 Autify Connect を利用して、`localhost` で動かしているサイトに対するテスト実行が可能です。 ただし、シナリオ実行時のURLとして、 `http://localhost` や `http://127.0.0.1` のように、ローカルホストまたはローカルネットワークにリンクするようなURLやIPアドレスを使用すると正しく動きません。 そのため、次の方法のいずれかを利用してテスト実行を行なってください。

1. `localhost.autify.com` を使用する\
   127.0.0.1を指すFQDNを用意しました。このFQDNは `localhost` や `127.0.0.1` の代わりに使用することができます。 もし、すでに `http://localhost` のようなURLでテストシナリオをレコーディングしている場合は、テストプランの[URL置換機能](https://help.autify.com/nocode-web/autify-university/foundation/test-plans/url-replacements.md)を使用することができます。
   * `localhost.autify.com`は`https`で利用可能ですか？
     * はい、利用可能です。`localhost.autify.com`を`https`で動作させるためのローカルSSL証明書を準備しています。以下の手順に従ってSSL証明書のセットアップを行ってください。

       * [AutifyCA.pem](https://autifyconnect.s3.ap-northeast-1.amazonaws.com/autify-localhost-ssl-cert/AutifyCA.pem), [localhost.autify.com.crt](https://autifyconnect.s3.ap-northeast-1.amazonaws.com/autify-localhost-ssl-cert/localhost.autify.com.crt) および [localhost.autify.com.key](https://autifyconnect.s3.ap-northeast-1.amazonaws.com/autify-localhost-ssl-cert/localhost.autify.com.key)ファイルをダウンロードしてください。
       * システムにルート証明書を信頼させます。

       MacOS

       ```
       sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" /file/path/AutifyCA.pem
       ```

       Linux

       ```
       # Install the ca-certificates package.
       sudo apt-get install -y ca-certificates

       # Rename AutifyCA.pem file to AutifyCA.crt and copy to the `/usr/local/share/ca-certificates` directory
       sudo cp AutifyCA.pem /usr/local/share/ca-certificates/AutifyCA.crt

       # Run the update command
       sudo update-ca-certificates
       ```

       * ルート証明書を追加した後、localhost.autify.comのcrtおよびkeyファイルを使用してローカルサーバーを起動してください。
         * Nginxの例:

       ```
       # You can find more infomation about Nginx SSL setup here: http://nginx.org/en/docs/http/configuring_https_servers.html
       # Add the setup below to the Nginx config
       server {
           ...
           listen                 443 ssl;
           server_name            localhost.autify.com;
           ssl_certificate        /file/path/localhost.autify.com.crt;
           ssl_certificate_key    /file/path/localhost.autify.com.key;
       }
       ```

       * `localhost.autify.com`にアクセスして確認できます
2. `192.168.86.92` のような他のIPアドレスを使用する。
3. `hosts` ファイルを編集し、以下のようにアプリケーションのエイリアスを設定します。

   ```
   127.0.0.1       local.your-application.com
   ::1             local.your-application.com
   ```

   通常 `hosts` ファイルは以下のパスにあります。

   | OS           | Path                                  |
   | ------------ | ------------------------------------- |
   | Linux, macOS | /etc/hosts                            |
   | Windows      | c:\Windows\System32\Drivers\etc\hosts |

なお、下のリストは完全なものではありませんが、以下のホスト名はサポートしておりません。 こちらのホスト名を利用してシナリオをレコーディングした際には、上記のいずれかの対応が必要となりますので、ご注意ください。

```
localhost
*.localhost
[::1]
127.0.0.1/8
169.254/16
[FE80::]/10
```

*※その他にも、例えば、Windows OSを使用したテストでは、`loopback`も認識することになります。*

{% hint style="warning" %}
**注意事項**

また、アプリケーションの中で直接localhost（またはサポートされていないホスト名）にリクエストを送信する場合には、上記対応での回避はできませんので、ご注意ください。
{% endhint %}

上記のいずれを試してもうまくいかない場合には、お気軽にサポートまでお問い合わせください。


---

# 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/faq/faq-autify-connect/does-autify-connect-support-localhost-testing.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.
