|
| 1 | +--- |
| 2 | +slug: how-to-run-test-projects |
| 3 | +title: How to Run and Test Projects |
| 4 | +tags: [] |
| 5 | +toc_max_heading_level: 5 |
| 6 | +--- |
| 7 | +There are 4 ways to test your project in FlutterFlow. |
| 8 | +- Preview |
| 9 | +- Test |
| 10 | +- Run |
| 11 | +- Local Run |
| 12 | + |
| 13 | +## Preview Mode |
| 14 | +You can use the Preview Mode to quickly try out your app on a virtual device without waiting for it to build. This is helpful primarily for navigation and animations. You can also preview your app in the Dark/Light mode and visualize it on various mobile, tablet, and desktop devices. |
| 15 | + |
| 16 | +<div class="alert alert--info" role="alert"> |
| 17 | +#### When to Use Preview Mode |
| 18 | +The main benefit is that your app will load instantly. However, because of the limitations this feature is used much less often that the other testing modes. |
| 19 | +</div> |
| 20 | +<div class="alert alert--warning" role="alert"> |
| 21 | + #### Preview Mode Limitations |
| 22 | + - Actions may not trigger or work properly. |
| 23 | + - FontAwesome icons jump around when mouse hovers over certain material widgets. |
| 24 | + - Firestore data is not loaded from Firebase. |
| 25 | + - Firebase auth flow can't be tested. We always allow log in. |
| 26 | + - API Calls can't be run or tested here. |
| 27 | + - Refresh if animation actions are not working. |
| 28 | + - Refresh if Clear TextFields actions are not working |
| 29 | + - RevenueCat data is not loaded. |
| 30 | + - Paywall actions execute as if the entitlement is active. |
| 31 | + - Hero Animation may not work on dynamically generated widgets. |
| 32 | + - Dropdown disabling does not work in |
| 33 | + - Preview Mode. |
| 34 | + - Tooltip does not work for some screen sizes in Preview Mode. |
| 35 | +</div> |
| 36 | + |
| 37 | +## Test Mode |
| 38 | + |
| 39 | +Test mode uses Flutter's "Hot Reload" feature, which lets you immediately see any changes made to code in an emulator or on-device. Running your app in _Test_ Mode helps you experiment, test UIs, and fix bugs faster. |
| 40 | + |
| 41 | +To run your app in Test Mode: |
| 42 | + |
| 43 | +1. Click on the **Test icon** or press **Cmd/Ctrl + I** (a keyboard shortcut). This will run your app in a new browser window. |
| 44 | +2. Switch to the app builder and make some changes, such as changing colors and alignment. |
| 45 | +3. Now switch to the Test Mode tab and click **Instant Reload** or press **Cmd/Ctrl + J** to see the changes in under 10 seconds. |
| 46 | + |
| 47 | +<h4>Test Mode Button Colors</h4> |
| 48 | +The test mode button color indicates the following status: |
| 49 | + - Orange: Building |
| 50 | + - Green: Ready |
| 51 | + - Yellow: Expiring Soon |
| 52 | + - Red: Expired |
| 53 | +<div class="alert alert--info" role="alert"> |
| 54 | +#### When to Use Test Mode |
| 55 | +When designing and developing your app, Test Mode is the second most common testing mode (next to Local Run). It's Hot Reloading allows for fast iteration and testing. It's downsides compared to Local Run are its restricted time (30 min.) and lack of access to some features (e.g. camera). |
| 56 | +</div> |
| 57 | +<div class="alert alert--info" role="alert"> |
| 58 | +<h4>Troubleshooting – Slow Loading</h4> |
| 59 | +If you see a progress bar at the top of the device running for over 15 seconds, try refreshing the page. |
| 60 | +</div> |
| 61 | +<div class="alert alert--warning" role="alert"> |
| 62 | +#### Test Mode Limitations |
| 63 | +- 30 minute testing time. After the 30 minutes has expired, you can start another test mode. |
| 64 | +- If you see a grey "broken" screen with a sad face, it may be a DNS server issue with your network provider. We recommend using CloudFlare's 1.1.1.1 DNS server. Click here to see instructions. |
| 65 | +- Lottie animation may not load if you provide a variable path. |
| 66 | +- Cookies need to be enabled for Test Mode to function properly. They are only used for functional purposes. |
| 67 | +- If you see a progress bar where the phone outline should be that lasts longer than a 15 seconds, try refreshing the page. |
| 68 | +- The device screen can not be wider than the page's width. |
| 69 | +- Copy to Clipboard Action is not supported in Test Mode. Use Run Mode to avoid this issue. |
| 70 | +- Widgets having Shimmer or Tint animation might not appear properly. |
| 71 | +- Assets used within Custom Code might not appear properly. |
| 72 | +- Audio Recording actions do not work in Test Mode, use web publishing in Settings to test recording audio. |
| 73 | +</div> |
| 74 | + |
| 75 | +## Run Mode |
| 76 | + |
| 77 | +You can test a fully functional version of your app using the _Run_ mode, including live data. It will build the app, which typically requires around 2-4 minutes - but can be longer for larger projects. You can then interact with your app through your web browser. |
| 78 | + |
| 79 | +To run the app in Run Mode: |
| 80 | + |
| 81 | +1. Click on the **dropdown** next to the Test Mode button \***\*or press **Cmd/Ctrl + E\*\* (a keyboard shortcut). This will run your app in a new browser window. |
| 82 | +<div class="alert alert--info" role="alert"> |
| 83 | +#### When to Use Run Mode |
| 84 | +The main benefit of Run Mode is the ability to share a running app. The url of the Run Mode is public and shareable. All Run Modes will persist and can be accessed in the drop down menu next to the lightning bolt icon in upper right of the FlutterFlow builder. |
| 85 | +</div> |
| 86 | +<div class="alert alert--warning" role="alert"> |
| 87 | +#### Run Mode Limitations |
| 88 | +Run Mode does not support Hot Reloading so any changes you make to your app will not be reflected in the Run Mode. In order to see the changes you would have to create another Run Mode. |
| 89 | +</div> |
| 90 | + |
| 91 | +## Local Run |
| 92 | +You can test your app on an emulator or physical mobile device with Local Run feature, which is available in the FlutterFlow Desktop App. Local Run automatically tracks changes in your FlutterFlow project, downloads the code locally, and gives you the option to use Flutter's Hot Reload or Hot Restart to see your changes instantly on a device. |
| 93 | + |
| 94 | +[How to Setup Local Run](https://docs.flutterflow.io) |
0 commit comments