testainers 0.1.1 copy "testainers: ^0.1.1" to clipboard
testainers: ^0.1.1 copied to clipboard

Testainers is a powerful Dart plugin designed to streamline the management of containers for testing purposes.

example/testainers_example.dart

import 'dart:io';

import 'package:test/test.dart';
import 'package:testainers/testainers.dart';

import '../helpers/http_service.dart';

///
///
///
void main() {
  ///
  ///
  ///
  group('Test Httpbucket', () {
    final TestainersHttpbucket container = TestainersHttpbucket();
    final HttpService httpService = HttpService();

    ///
    setUpAll(() async {
      await container.start();
    });

    ///
    test('First Test', () async {
      final HttpClientResponse response = await httpService
          .get(Uri.parse('http://localhost:${container.httpPort}/methods'));

      expect(response.statusCode, 200);
      expect(response.contentLength, greaterThan(0));
    });

    ///
    tearDownAll(() {
      httpService.close();
      container.stop();
    });
  });
}
6
likes
120
pub points
6%
popularity

Publisher

verified publishertestainers.com

Testainers is a powerful Dart plugin designed to streamline the management of containers for testing purposes.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on testainers