suupr_tests 1.0.0-beta.4 copy "suupr_tests: ^1.0.0-beta.4" to clipboard
suupr_tests: ^1.0.0-beta.4 copied to clipboard

No-code E2E orchestration framework for automated Flutter testing using VM Service extensions.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:suupr_tests/suupr_tests.dart';

void main() {
  // 1. Initialize the SuuprTestsBinding to enable remote orchestration.
  // This registers service extensions that the SuuprTests UI can connect to.
  SuuprTestsBinding.ensureInitialized();

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Suupr Tests Example',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Suupr Tests Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              key: const Key('counter_text'),
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        key: const Key('increment_button'),
        child: const Icon(Icons.add),
      ),
    );
  }
}
0
likes
0
points
13
downloads

Publisher

verified publisherduupr.io

Weekly Downloads

No-code E2E orchestration framework for automated Flutter testing using VM Service extensions.

Homepage
Repository (GitHub)
View/report issues

Topics

#testing #automation #e2e #widget-testing

License

unknown (license)

Dependencies

flutter, vm_service

More

Packages that depend on suupr_tests