diff --git a/docs/accounts-billing/new-pricing-comparison.md b/docs/accounts-billing/new-pricing-comparison.md index c72d03d2..27260c8c 100644 --- a/docs/accounts-billing/new-pricing-comparison.md +++ b/docs/accounts-billing/new-pricing-comparison.md @@ -354,6 +354,14 @@ export const PricingToggles = () => { Up to 3 tests per project Unlimited tests + + Test Pilot
AI-powered QA testing with additional credits + ❌ + ✅ + ✅ + ✅ + ✅ + Custom Classes
Bring custom Dart classes into your app ❌ diff --git a/docs/testing-deployment-publishing/running-your-app/automated-tests.md b/docs/testing-deployment-publishing/running-your-app/automated-tests.md index ce4813a7..a48d29d7 100644 --- a/docs/testing-deployment-publishing/running-your-app/automated-tests.md +++ b/docs/testing-deployment-publishing/running-your-app/automated-tests.md @@ -3,7 +3,7 @@ slug: /testing/automated-tests title: Automated Tests description: Discover how to effectively utilize automated testing in FlutterFlow to ensure your app performs as intended. tags: [Automated Tests, Testing] -sidebar_position: 2 +sidebar_position: 3 keywords: [Automated Tests, Testing, FlutterFlow] --- @@ -13,10 +13,11 @@ Automated Tests allow you to test the behavior and appearance of your app to ens Internally, when you write tests, FlutterFlow generates code for the [Flutter integration testing framework](https://docs.flutter.dev/testing/integration-tests), which you can download and test locally or through services like [Firebase Test Lab](https://firebase.google.com/docs/test-lab). -:::note -FlutterFlow doesn’t support running tests on the platform yet. +:::warning[Legacy testing] +Automated Tests are now considered a legacy testing option in FlutterFlow. For new testing workflows, we recommend using [**Test Pilot**](test-pilot.md), which lets you create and run AI-powered QA tests using natural-language instructions. ::: + :::info[Pricing Details] - **Free and Basic plans:** Automated testing is not available. - **Growth plan:** Includes **1 test per project**. @@ -173,4 +174,4 @@ To run the tests locally: To run the tests on Firebase Test Lab, you can follow the instructions [**here**](https://docs.flutter.dev/testing/integration-tests#test-using-the-firebase-test-lab). -::: \ No newline at end of file +::: diff --git a/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-active-run.png b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-active-run.png new file mode 100644 index 00000000..a2661511 Binary files /dev/null and b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-active-run.png differ diff --git a/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-parameters.png b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-parameters.png new file mode 100644 index 00000000..763d1ae2 Binary files /dev/null and b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-parameters.png differ diff --git a/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-run-configuration.png b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-run-configuration.png new file mode 100644 index 00000000..4481f3c0 Binary files /dev/null and b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-run-configuration.png differ diff --git a/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-run-details.png b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-run-details.png new file mode 100644 index 00000000..ec706a9c Binary files /dev/null and b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-run-details.png differ diff --git a/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-run-history.png b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-run-history.png new file mode 100644 index 00000000..d9f10a28 Binary files /dev/null and b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-run-history.png differ diff --git a/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-test-playback.png b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-test-playback.png new file mode 100644 index 00000000..238f6e9b Binary files /dev/null and b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-test-playback.png differ diff --git a/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-tests-overview.png b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-tests-overview.png new file mode 100644 index 00000000..2d66bde6 Binary files /dev/null and b/docs/testing-deployment-publishing/running-your-app/imgs/test-pilot-tests-overview.png differ diff --git a/docs/testing-deployment-publishing/running-your-app/test-pilot.md b/docs/testing-deployment-publishing/running-your-app/test-pilot.md new file mode 100644 index 00000000..85ef02ba --- /dev/null +++ b/docs/testing-deployment-publishing/running-your-app/test-pilot.md @@ -0,0 +1,289 @@ +--- +slug: /testing/test-pilot +title: Test Pilot +description: Learn how to create and run AI-powered QA tests for your FlutterFlow app using Test Pilot. +tags: [Automated Tests, Testing] +sidebar_position: 2 +keywords: [Test Pilot, AI Testing, QA Testing, Testing, FlutterFlow, Automated Tests, Testing] +--- + +# Test Pilot + +Test Pilot in FlutterFlow allows you to run AI-powered tests for your app. Instead of building step-by-step integration tests manually, you create natural-language tests, group related tests together, and ask Test Pilot to interact with your app like a QA tester. + +This is useful when you want to validate important user journeys before publishing or sharing a new build. For example, you can ask Test Pilot to sign in with test credentials, add an item to a cart, open the profile page, or confirm that a checkout flow lands on the expected success screen. + +At a high level, Test Pilot creates a web build snapshot of your project, launches the app in a browser-based QA environment, and uses an AI agent to follow each test's instructions. After the run completes, you can review pass or fail status, per-test summaries, screenshots, playback, actions taken, and credit usage. + +## Create Test + +To get started, first create a **Test Group**. Use test groups to organize related tests, such as authentication, checkout, profile settings, or onboarding. + +After you create or select a test group, add tests that describe the exact journey Test Pilot should perform. Each test has: + +- **Test Name**: The label shown in the test group and run results. +- **Entry Page**: Optional initial route for the test. Use **App default** when the app should start from its default entry page. +- **Enabled or Disabled state**: A toggle to enable or disable a test. Only enabled tests are included when the group runs. +- **Instructions**: Natural-language steps for the AI agent to follow. +- **Expected Outcome**: Optional success criteria that Test Pilot should verify after completing the instructions. +- **Restart before test**: Optional behavior that starts the app fresh before that test. This is **turned off by default, so tests are executed sequentially** one by one and can continue from the state left by the previous test. Turn it on when a test should start from a clean app state and not depend on earlier tests. + + +Write instructions the way you would brief a QA teammate. Mention the screen, the UI element, the action to take, and the expected result. + + +For example, a login test might use: + +- **Instructions**: `Wait for the screen to load, then enter $email and $password into the text fields and click the continue button.` +- **Expected Outcome**: `The app should land on the home page.` + +:::tip +`$email` and `$password` are [**Test Parameters**](#test-parameters). After you create a parameter, you can reference it directly in test instructions by adding `$` before the parameter name. +::: + +Here's how to create tests: + +
+ +
+

+ +### Test Parameters + +Test Parameters let you store reusable values that Test Pilot can substitute into test instructions. This is especially helpful for credentials, environment-specific values, or other data that you do not want to type into every test. + + +Test Parameters are managed per [FlutterFlow Environment](../development-environments/development-environments.md). Use the **Environment** dropdown to switch between environments, then add the parameter values for the selected environment. + +Each parameter includes: + +- **Name**: The variable name used in instructions. +- **Value**: The value Test Pilot substitutes when running the test. +- **Description**: A clear note describing what the value is used for. +- **Encryption toggle**: Marks sensitive values so they are encrypted. + + +To use a parameter, create it from **Test Parameters**, then reference it in instructions with a dollar sign, such as `$email` or `$password`. + + +
+ +
+

+ +:::caution +For login tests, use a separate test account instead of a real user account. Secret parameters help hide sensitive values, but you should avoid using production credentials in Test Pilot runs. +::: + +## Run Test + +To run a test group, select the test group you want to run, click **Run Test Group**, choose the run configuration, and then click **Run Tests**. + +Run configuration options include: + +- **Device Sizes**: Uses the current canvas size by default. You can add predefined devices or custom width and height values. The run dialog supports up to 3 selected devices. +- **Brightness**: Choose light or dark mode. Dark mode is available only when dark mode is enabled in the project design system. + +:::info +Before starting a run, make sure the selected group has at least one enabled test, the project has no blocking errors, the selected environment is valid, and no other Test Pilot run is active for the same project or group. +::: + +
+ +
+

+ +## Review Test Results + +The **Run History** section shows the previous and active Test Pilot runs for the selected group. Click **View Results** to open the run details page. From there, you can review every test in the run and inspect the AI agent's explanation for each result. + +Each test result can include: + +- **View Test Playback**: Opens a step-by-step playback of the agent's interaction with the app. When you open Test Playback, you can use **Previous** and **Next** to move through each step, select a screenshot from the thumbnail strip, and review the agent's reasoning for that step. The playback side panel includes: + + - **Goal**: What the agent was trying to do in the selected step. + - **Observation**: What the agent saw on the screen. + - **Actions**: The action taken in that step and whether it succeeded. + - **Config**: Displays the test run duration, screen size, and options to show or hide the device frame and overlay. It also includes a **View JSON** option to inspect the raw step data. + +- **Screenshots**: Captured screens from the run. Use these to quickly see what the agent saw at key moments. +- **Actions Taken**: The actions the agent performed while executing the test, including clicks, text entry, key presses, completion steps, and whether each action succeeded. +- **Open Snapshot**: Opens the build snapshot used for the run. + + +
+ +
+

+ + +## Best Practices + +- Keep each test focused on one user journey, such as login, checkout, or opening profile settings. +- Start instructions with any setup the agent needs, such as waiting for the screen to load. +- Use clear UI descriptions, such as "click the profile icon on the top left side" instead of "click the icon." +- Add an expected outcome when the result matters, such as "the app should land on the home page." +- Store separate parameter values for each environment. +- Review screenshots, playback, and actions taken when a test fails, because the summary may point to a build, startup, UI, or instruction issue. +- Turn on **Restart before test** when a test should start from a clean app state. Leave it off when tests are intentionally designed to run sequentially. + +## Test Pilot Credits + +Test Pilot uses Test Pilot credits. Each project gets **5 free credits**, which equals **5 single-test runs**. After the free credits are used, runs use credits from an assigned Test Pilot Credits Pass. + +A Test Pilot Credits Pass is a paid add-on. Passes start at **$5/month for 100 credits**. One credit represents one single test being run. + +Credit usage is based on the number of tests, devices, and brightness modes included in the run. For example, if a test run includes **3 tests**, runs on **2 devices**, and uses both **light and dark mode**, it uses `3 * 2 * 2 = 12` credits. + +Before you start a run, FlutterFlow shows how many credits the run will use. This lets you review the cost of running the selected test group before you click **Run Tests**. + +Pricing: + +- **USD**: `$5/month` per pass unit. Each unit grants `100` credits per reset cycle. You can buy multiple units. For example, `10` units cost `$50/month` and grants `1000` credits. +- **INR**: The same pricing applies. +- **Regional discounts**: None. +- **Annual discount**: Approximately 25%. + +Pass types: + +- **Personal pass**: Purchased from Account billing and assignable to one personal project owned by that user. +- **Team pass**: Purchased from Teams billing and assignable to one project belonging to the same team. + +Pass assignment is permanent. You cannot manually clear, update or transfer the pass while the project still exists. If the assigned project is deleted, the pass becomes unassigned. If a project changes owner or team scope and the assigned pass no longer matches that scope, the pass should be unassigned automatically. For example, if a team project with an assigned team pass is moved to become a personal project, the team pass will be unassigned. + +Deleting or canceling a purchased pass is a billing action. Like other subscriptions and add-ons, when you delete a Test Pilot pass, you can continue to use it until the end of your current billing cycle. + +## FAQs + +
+Why can't I run tests? +

+Check that the project has available Test Pilot credits or free runs, at least one enabled test, editor access, no active Test Pilot run, a valid environment, and no blocking project errors. +

+
+ +
+Why do I see 0 credits? +

+This can happen when no Test Pilot Credits Pass is assigned to the project, the assigned pass has used all credits for the cycle, the assigned pass no longer matches the project scope, or credit status failed to load. +

+
+ +
+Why can't I assign my pass? +

+A pass may already be assigned, the project may already have a pass, the pass may not match the project scope, or you may not have the required billing permissions. Personal passes can only be assigned to matching personal projects, and team passes can only be assigned to matching team projects. +

+
+ +
+Can support move my pass? +

+Pass assignment is intended to be permanent. Contact support if you suspect a data issue, such as a stale assignment after a project was deleted or moved. +

+
+ +
+How many free credits do projects get? +

+Each project gets 5 free Test Pilot credits. Since 1 credit equals 1 single test run, this gives each project 5 free tests. After those credits are used, the project needs an assigned Test Pilot Credits Pass. +

+
+ +
+Why doesn't my pass have a regional discount? +

+Test Pilot Credits Passes do not use regional discounts. The billing page shows the price that applies to your account. +

+
+ +
+Do I get free credits if I have an educational account? +

+Educational accounts get 5 free tests per project, and are able to purchase Test Pilot passes for further credits. +

+
\ No newline at end of file