testainers 0.2.0 copy "testainers: ^0.2.0" to clipboard
testainers: ^0.2.0 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();
    });
  });
}
8
likes
150
points
1.25k
downloads

Publisher

verified publishertestainers.com

Weekly Downloads

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

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on testainers