test_core 0.3.7

  • Readme
  • Changelog
  • Installing
  • 97

A minimal package for writing and running tests as well as extensions for implementing a custom test runner.

At this time this package is not intended to be used publicly. The API is not yet stable.

0.3.7 #

  • Support the latest package:coverage.

0.3.6 #

  • Expose the Configuration class and related classes through backend.dart.

0.3.5 #

  • Add additional information to an exception when we end up with a null RunnerSuite.

0.3.4 #

  • Fix error messages for incorrect string literals in test annotations.

0.3.3 #

  • Support latest package:vm_service.

0.3.2 #

  • Drop the package_resolver dependency.

0.3.1 #

  • Support latest package:vm_service.
  • Enable asserts in code running through spawnHybrid APIs.
  • Exit with a non-zero code if no tests were ran, whether due to skips or having no tests defined.

0.3.0 #

  • Bump minimum SDK to 2.4.0 for safer usage of for-loop elements.
  • Deprecate PhantomJS and provide warning when used. Support for PhantomJS will be removed in version 2.0.0.
  • Differentiate between test-randomize-ordering-seed not set and 0 being chosen as the random seed.
  • deserializeSuite now takes an optional gatherCoverage callback.
  • Support retrying of entire test suites when they fail to load.
  • Fix the compiling message in precompiled mode so it says loading instead, which is more accurate.
  • Change the behavior of the concurrency setting so that loading and running don't have separate pools.
    • The loading and running of a test are now done with the same resource, and the concurrency setting uniformly affects each. With -j1 only a single test will ever be loaded at a time.
    • Previously the loading pool was 2x larger than the actual concurrency setting which could cause flaky tests due to tests being loaded while other tests were running, even with -j1.
  • Avoid printing uncaught errors within spawnHybridUri.

0.2.18 #

  • Allow test_api 0.2.13 to work around a bug in the SDK version 2.3.0.

0.2.17 #

  • Add file_reporters configuration option and --file-reporter CLI option to allow specifying a separate reporter that writes to a file instead of stdout.

0.2.16 #

  • Internal cleanup.
  • Add customHtmlTemplateFile configuration option to allow sharing an html template between tests
  • Depend on the latest test_api.

0.2.15 #

  • Add a StringSink argument to reporters to prepare for reporting to a file.
  • Add --test-randomize-ordering-seed` argument to randomize test execution order based on a provided seed
  • Depend on the latest test_api.

0.2.14 #

  • Support the latest package:analyzer.
  • Update to latest package:matcher. Improves output for instances of private classes.

0.2.13 #

  • Depend on the latest package:test_api.

0.2.12 #

  • Conditionally import coverage logic in engine.dart. This ensures the engine is platform agnostic.

0.2.11 #

  • Implement code coverage gathering for VM tests.

0.2.10 #

  • Add a --debug argument for running the VM/Chrome in debug mode.

0.2.9+2 #

  • Depend on the latest test_api.

0.2.9+1 #

  • Allow the latest package:vm_service.

0.2.9 #

  • Mark package:test_core as deprecated to prevent accidental use.
  • Depend on the latest test_api.

0.2.8 #

  • Depend on vm_service instead of vm_service_lib.
  • Drop dependency on pub_semver.
  • Allow analyzer version 0.38.x.

0.2.7 #

  • Depend on vm_service_lib instead of vm_service_client.
  • Depend on latest package:analyzer.

0.2.6 #

  • Internal cleanup - fix lints.
  • Use the latest test_api.

0.2.5 #

  • Fix an issue where non-completed tests were considered passing.
  • Updated compact and expanded reporters to display non-completed tests.

0.2.4 #

  • Avoid dart:isolate imports on code loaded in tests.
  • Expose the parseMetadata function publicly through a new backend.dart import, as well as re-exporting package:test_api/backend.dart.

0.2.3 #

  • Switch import for IsolateChannel for forwards compatibility with 2.0.0.

0.2.2 #

  • Allow analyzer version 0.36.x.
  • Update to matcher version 0.12.5.

0.2.1+1 #

  • Allow analyzer version 0.35.x.

0.2.1 #

  • Require Dart SDK >=2.1.0.
  • Require latest test_api.

0.2.0 #

  • Remove remote_listener.dart and suite_channel_manager.dart from runner and depend on them from test_api.

0.1.0 #

  • Initial release of test_core. Provides the basic API for writing and running tests on the VM.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  test_core: ^0.3.7

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:test_core/test_core.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
98
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
97
Learn more about scoring.

We analyzed this package on Jun 4, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.2
  • pana: 0.13.8-dev

Health suggestions

Fix lib/src/runner/load_suite.dart. (-0.50 points)

Analysis of lib/src/runner/load_suite.dart reported 1 hint:

line 18 col 1: 'package:test_core/test_core.dart' is deprecated and shouldn't be used. package:test_core is not intended for general use. Please use package:test..

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and test_core.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
analyzer >=0.36.0 <0.40.0 0.39.10
args ^1.4.0 1.6.0
async ^2.0.0 2.4.1
boolean_selector >=1.0.0 <3.0.0 2.0.0
collection ^1.8.0 1.14.12
coverage >=0.13.3 <0.15.0 0.14.0
glob ^1.0.0 1.2.0
io ^0.3.0 0.3.4
matcher >=0.12.6 <0.12.7 0.12.6
meta ^1.1.5 1.1.8
path ^1.2.0 1.7.0
pedantic ^1.0.0 1.9.0
pool ^1.3.0 1.4.0
source_map_stack_trace ^2.0.0 2.0.0
source_maps ^0.10.2 0.10.9
source_span ^1.4.0 1.7.0
stack_trace ^1.9.0 1.9.3
stream_channel >=1.7.0 <3.0.0 2.0.0
test_api 0.2.16 0.2.16
vm_service >=1.0.0 <5.0.0 4.0.4
yaml ^2.0.0 2.2.1
Transitive dependencies
_fe_analyzer_shared 4.0.0
charcode 1.1.3
convert 2.1.1
crypto 2.1.5
csslib 0.16.1
html 0.14.0+3
js 0.6.1+1
logging 0.11.4
node_interop 1.1.1
node_io 1.1.1
package_config 1.9.3
pub_semver 1.4.4
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+15