test_screenshot 0.0.1 copy "test_screenshot: ^0.0.1" to clipboard
test_screenshot: ^0.0.1 copied to clipboard

Take screenshots during your unit tests or integration tests

Take screenshots during your unit tests or integration tests.

usage #

You must first wrap your test with a screenshotter, then you can take screenshot.

The screenshot() method is added on the widget tester, so you can call screenshot() on the widgetTester.

  testWidgets('should create a screenshot', (tester) async {
    await tester.pumpWidget(
      Screenshotter(
        child: MaterialApp(
          home: Scaffold(body: Center(child: Icon(Icons.home))),
        ),
      ),
    );

    await tester.screenshot(path: file.path);
  });
7
likes
0
points
1.21k
downloads

Publisher

unverified uploader

Weekly Downloads

Take screenshots during your unit tests or integration tests

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_test, image

More

Packages that depend on test_screenshot