--- title: "Bitrise 連携" slug: "bitrise-integration" updated: 2024-07-02T06:41:45Z published: 2024-07-02T06:41:45Z canonical: "help.autify.com/bitrise-integration" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Bitrise 連携 Autify ではお手持ちのBitrise workflow から簡単にビルドをアップロードしたりテストプランを実行できる公式のBitrise step を提供しています。 ## はじめてみよう このドキュメントでは、皆さんのBitrise workflow でどのようにAutify のBitrise 連携を利用するかを順に説明していきます。 ### 前提条件 まず、すでにBitrise workflow を使ってアプリケーションのビルドを行なっているものとします。そのビルドstep のすぐ後にAutify のテストを実行するstep を追加することで、新しくビルドされたアプリケーションがエンドツーエンドのユーザ体験を損ねていないことを確認できるようにします。 次に、[Autify NoCode Mobile](https://mobile-app.autify.com) でテストプランを作成する必要があります。テストプランまたはシナリオのURL (例: `https://mobile-app.autify.com/projects/AAA/scenarios/BBB`) をメモしておいてください、後ほど利用します。 さらに、[パーソナルアクセストークンを生成する](https://help.autify.com/mobile/docs/ja/api-integration#api-%E8%AA%8D%E8%A8%BC%E3%83%88%E3%83%BC%E3%82%AF%E3%83%B3%E7%94%9F%E6%88%90%E6%96%B9%E6%B3%95)必要があります。後ほどBitrise Secrets に保存するために、生成されたトークンはどこかにメモしておいて下さい。 *注: パーソナルアクセストークンは1人のユーザに紐づいてしまうので、CI/CD 連携のために組織にマシンユーザを作って、そのパーソナルアクセストークンを使うことをお勧めします。* ### パーソナルアクセストークンをBitrise Secrets に保存 上で生成したパーソナルアクセストークンを[Bitrise のドキュメント](https://devcenter.bitrise.io/ja/builds/secrets.html)に従って、Secrets に保存します。Secret の名前は任意ですが、その名前はBitrise workflow を定義するときに参照します。ここでは`AUTIFY_MOBILE_ACCESS_TOKEN` と命名したと仮定しておきます。 ### Autify NoCode Mobile にビルドをアップロードしたりテストを実行するBitrise step を追加 それでは、お手持ちのBitrise workflow に新しいstep を追加しましょう。以下の例を参考にして`bitrise.yaml` を編集してください。`autify-test-url` の値は、上でメモしたURL になります。Bitrise UI を経由しても全く同じ設定をすることができます。 - [Autify Test Run step](https://www.bitrise.io/integrations/steps/autify-test-run) - [Autify Upload step](https://www.bitrise.io/integrations/steps/autify-upload) --- 新しいビルドファイルをアップロードしてテストを開始する (テストの完了は待たない): ``` ## With Android Build step: https://www.bitrise.io/integrations/steps/android-build - android-build@1: {} - autify-test-run@1: inputs: - access_token: "$AUTIFY_MOBILE_ACCESS_TOKEN" - autify_test_url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB - build_path: "$BITRISE_APK_PATH" ## With Xcode build for simulator step: https://www.bitrise.io/integrations/steps/xcode-build-for-simulator - xcode-build-for-simulator@0: {} - autify-test-run@1: inputs: - access_token: "$AUTIFY_MOBILE_ACCESS_TOKEN" - autify_test_url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB - build_path: "$BITRISE_APP_DIR_PATH" ``` もしテストが完了するか、タイムアウトするまで待つ場合: ``` - autify-test-run@1: inputs: - access_token: "$AUTIFY_MOBILE_ACCESS_TOKEN" - autify_test_url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB - build_path: /path/to/your-[ios.app|android.apk] - wait: 'true' - timeout: '3000' ``` **警告: この設定はテスト完了を待っている間もBitrise credit を消費します。タイムアウトを延長するときは注意してください。** 新しいビルドファイルをアップロードするだけ (`workspace_id` は上でメモしたURL の`/projects/` のすぐ後ろのid): ``` - autify-upload@1: inputs: - access_token: "$AUTIFY_MOBILE_ACCESS_TOKEN" - workspace_id: AAA - build_path: /path/to/your-[ios.app|android.apk] ``` ## まとめ [Autify のBitrise step](https://www.bitrise.io/integrations/steps/autify-test-run) を使うことで、ビルド後にテストプランの実行を自動化できるので、無駄な時間を使うことなくリグレッションをすぐに検知して適切な行動を取ることができるようになります。