Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a flutter overview page. #2906

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ you can [upload](#uploading-your-flutter-app-to-sauce-labs) it to Sauce Labs, [C

## Native Flutter Integration Driver vs Appium Flutter Integration Driver

| Use Cases | Native Flutter Driver | Appium Flutter Integration Driver |
| ----------------------------------------------------------------------------------------------------------------------------------- | --------------------- | --------------------------------- |
| Writing tests in languages other than Dart || ✔️ |
| Running integration tests for Flutter apps with embedded webview or native view, or existing native apps with embedded Flutter view || ✔️ |
| Running tests on multiple devices simultaneously || ✔️ |
| Running integration tests on device farms that offer Appium support || ✔️ |
| App interactions beyond Flutter’s contextuality (e.g., sending an OTP from a message application) || ✔️ |
The Appium Flutter Integration Driver is a wrapper around the Appium framework and uses the Flutter Integration Test SDK
to enable you to write tests in languages other than Dart, such as Java, Python, Ruby, and more. The driver is designed to
run integration tests for Flutter apps with embedded WebViews or native views, or existing native apps with embedded Flutter views.

For more information, see [Choosing a Flutter Integration Driver for Testing](/mobile-apps/automated-testing/flutter/#choosing-a-flutter-integration-driver-for-testing).

## Differences from Appium Flutter Driver

Expand Down
67 changes: 67 additions & 0 deletions docs/mobile-apps/automated-testing/flutter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
id: flutter
title: Flutter on Sauce Labs
sidebar_label: Using Flutter
description: Test your mobile Flutter apps on Sauce Labs
---

import useBaseUrl from '@docusaurus/useBaseUrl';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Are your iOS and Android apps built with Flutter? Sauce Labs supports testing Flutter apps on real devices.
diemol marked this conversation as resolved.
Show resolved Hide resolved

[Flutter](https://flutter.dev/) is a popular open-source framework created by Google to build natively compiled
applications for mobile, web, and desktop from a single codebase. You can run your tests on Sauce Labs to benefit
from speed, parallelization, failure analysis, simple setup, and more.


## What You'll Need

- A Sauce Labs account ([Log in](https://accounts.saucelabs.com/am/XUI/#login/) or sign up for a [free trial license](https://saucelabs.com/sign-up))
- Your Sauce Labs [Username and Access Key](https://app.saucelabs.com/user-settings)
- Flutter mobile app. If you don't have one, you could use our Flutter Demo App:
- [Sauce Labs Flutter Demo App](https://github.com/saucelabs/my-demo-app-flutter)


## Choosing a Flutter Integration Driver for Testing

There are two drivers that you can use to test your Flutter app on Sauce Labs: Native Flutter Integration Driver or
diemol marked this conversation as resolved.
Show resolved Hide resolved
Appium Flutter Integration Driver.

### Appium Flutter Integration Driver

With the Appium Flutter Integration Driver, you can write tests in for both Android and iOS devices using the Appium
diemol marked this conversation as resolved.
Show resolved Hide resolved
framework. The Appium Flutter Integration Driver is a wrapper around the Appium framework that allows you to write tests
in languages other than Dart, such as Java, Python, Ruby, and more.

### Native Flutter Integration Driver

With the Native Flutter Integration Driver, you can write tests in Dart and run them on Sauce Labs. Only Android is
diemol marked this conversation as resolved.
Show resolved Hide resolved
currently supported.

:::info iOS Support

We're excited to share that Sauce Labs is actively working on expanding support for Flutter integration tests on iOS.
Stay tuned for updates as we continue to develop this capability!
:::

Both drivers are based on [Flutter Integration Test](https://docs.flutter.dev/cookbook/testing/integration/introduction).
Check the table below to see which driver is best for your testing needs.

| Use Cases | Native Flutter Driver | Appium Flutter Integration Driver |
| ----------------------------------------------------------------------------------------------------------------------------------- | --------------------- | --------------------------------- |
| Writing tests in languages other than Dart || ✔️ |
| Running integration tests for Flutter apps with embedded webview or native view, or existing native apps with embedded Flutter view || ✔️ |
| Running tests on multiple devices simultaneously || ✔️ |
| Running integration tests on device farms that offer Appium support || ✔️ |
| App interactions beyond Flutter’s contextuality (e.g., sending an OTP from a message application) || ✔️ |


## How to Get Started

After choosing the driver that best fits your testing needs, follow the guides below to set up your Flutter app for
testing on Sauce Labs.

- [Appium Flutter Integration Driver](/mobile-apps/automated-testing/appium/appium-flutter-integration-driver)
- [Native Flutter Integration Driver Devices - Android](/mobile-apps/automated-testing/flutter/flutter-integration-testing-android)
4 changes: 2 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const unwrapJsx = require('./src/plugins/unwrap-jsx');

// Enabling PR previews
let siteBaseUrl = "/"
if (process.env.PREVIEW_PATH) siteBaseUrl += process.env.PREVIEW_PATH
let siteBaseUrl = '/';
if (process.env.PREVIEW_PATH) siteBaseUrl += process.env.PREVIEW_PATH;

const docusaurusConfig = {
title: 'Sauce Labs Documentation',
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,7 @@ module.exports = {
label: 'Flutter',
collapsed: true,
items: [
'mobile-apps/automated-testing/flutter',
'mobile-apps/automated-testing/flutter/flutter-integration-testing-android',
],
},
Expand Down