Code Monkey home page Code Monkey logo

very_good_test_runner's People

Contributors

alestiago avatar dependabot[bot] avatar felangel avatar luisredondo avatar renancaraujo avatar tomarra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

very_good_test_runner's Issues

chore: release 0.2.0

Description
Need to make a release of 0.2.0 given the Dart updates. This is technically a breaking change.

fix: `flutter` command gets locked when trying to run sharded tests parallely

Description
When running multiple flutter test commands parallely via flutterTest() method for sharded tests, the cli throws the below error

Waiting for another flutter command to release the startup lock...

If the same flutter test command is ran for sharded tests without using flutterTest() method but via Process.start, the flutter command runs the sharded tests successfully.

Steps To Reproduce

  1. Call the below methods simultaneously
flutterTest(
          arguments:
          "--total-shards 2 --shard-index 0 '${testDirectory.path}/example_a[1]_test.dart'"
              .split(' '),
          workingDirectory: tempDirectory.path,
        );

flutterTest(
          arguments:
          "--total-shards 2 --shard-index 1 '${testDirectory.path}/example_a[2]_test.dart'"
              .split(' '),
          workingDirectory: tempDirectory.path,
        );

Expected Behavior
When executing the flutter test command via Process.start for the shared tests, it runs without failure.
flutterTest() method also uses Process.start internally & it should run without locking flutter command on the sharded tests.

Process.start(
    'flutter',
    "--total-shards 2 --shard-index 1 '${testDirectory.path}/example_a[1]_test.dart'"
              .split(' '),
  );
Process.start(
    'flutter',
    "--total-shards 2 --shard-index 2 '${testDirectory.path}/example_a[2]_test.dart'"
              .split(' '),
  );

Screenshots
image

Additional Context
Please find the test case to reproduce the issue here:

test('emits correctly for sharded tests (e2e)', () async {
      final tempDirectory = Directory.systemTemp.createTempSync();
      File('${tempDirectory.path}/pubspec.yaml').writeAsStringSync(
        '''
name: example
version: 0.1.0+1

environment:
  sdk: ">=2.12.0 <3.0.0"

dev_dependencies:
  test: any
''',
      );
      final testDirectory = Directory('${tempDirectory.path}/test')
        ..createSync();
      File('${testDirectory.path}/example_a[1]_test.dart').writeAsStringSync(
        '''
import 'package:test/test.dart';

void main() {
  test('example', () {
    expect(true, isTrue);
  });
}
''',
      );

      File('${testDirectory.path}/example_a[2]_test.dart').writeAsStringSync(
        '''
import 'package:test/test.dart';

void main() {
  test('example', () {
    expect(true, isTrue);
  });
}
''',
      );
      expect(
        flutterTest(
          arguments:
              "--total-shards 2 --shard-index 0 '${testDirectory.path}/example_a[1]_test.dart'"
                  .split(' '),
          workingDirectory: tempDirectory.path,
        ).where((e) => e is DoneTestEvent).first,
        completes,
      );

      expect(
        flutterTest(
          arguments:
          "--total-shards 2 --shard-index 1 '${testDirectory.path}/example_a[2]_test.dart'"
              .split(' '),
          workingDirectory: tempDirectory.path,
        ).where((e) => e is DoneTestEvent).first,
        completes,
      );
    });

fix: exclude specific folders from coverage

Description
Hi team, we are not able exclude folders from coverage, I don't know if it's a bug, or
For instance we have generated folder that include our localization

`very_good test --coverage --exclude-coverage "lib/l10n/**"``

Steps To Reproduce

  1. On your project folder create dummy folder with some dart files
  2. Open a terminal
  3. "cd" to your flutter project folder
  4. Launch the coverage very_good test --coverage --exclude-coverage "lib/l10n/**"
  5. See the results of the coverage (using vscode flutter coverage extension)

Expected Behavior
The folder excluded must be ignored for coverage

Screenshots
image

Additional Context
Tried also to ignore files directly it's not working too

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.