flutter_test_runners 1.0.0 copy "flutter_test_runners: ^1.0.0" to clipboard
flutter_test_runners: ^1.0.0 copied to clipboard

Widget test runners for Flutter apps and packages.

Flutter Test Runners #

Widget test runners for Flutter apps and packages.

Built by the Flutter Bounty Hunters

Write tests that run on a specified platform.

testWidgetsOnMac("My test", (tester) async {
  // This test runs with a simulated Mac platform.
});

testWidgetsOnIos("My test", (tester) async {
  // This test runs with a simulated iOS platform.
});

testWidgetsOnAndroid("My test", (tester) async {
  // This test runs with a simulated Android platform.
});

Write tests that run on multiple simulated platforms.

testWidgetsOnMobile("My test", (tester) async {
  // This test runs once on iOS and once on Android.
});

testWidgetsOnDesktop("My test", (tester) async {
  // This test runs once on Mac, once on Windows, and once on Linux.
});

Platform test runners are especially useful when you want to test a platform-specific behavior, such as a platform-specific keyboard shortcut. For example, a desktop app can test a "copy" shortcut with the help of flutter_test_robots.

testWidgetsOnMac("My shortcut test", (tester) async {
  // Setup the test.

  await tester.pressCmdC();

  // Verify the results of the copy command.
});
1
likes
140
points
25.8k
downloads

Publisher

verified publisherflutterbountyhunters.com

Weekly Downloads

Widget test runners for Flutter apps and packages.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_test, meta

More

Packages that depend on flutter_test_runners