no longer maintained
@proxyannotation to the
logparameter to the
reflectTestsfunction and removed the
loggingpackage dependency. A basic example of using the
logparameter is to pass the
void main() => reflectTests(log: print);
descriptionparameter of the
TestGroupannotation constructor to a required parameter. The
TestGroupannotation itself is optional; any library that contains one or more annotated
Testfunctions is considered a group. So in practice we found that using
TestGroupimplied the desire to set a custom
descriptionin which case it was overly verbose to use the named argument each time.
Skipannotation for declaring that the annotated test function shall be skipped by test drivers.
skipstring from the
Testannotation; this has been replaced by the
unittestdependency to '>=0.11.0 <0.12.0'.
Usagesection to the
Mock.clearCallsto remove conflict with a method named
clearon the class being mocked.
expectDonewhich set expectations for stream event counts but not data.
Mock.clearto only clear the
callsand not the setup; the setup may be cleared separately if desired.
skipreason string to the
@Testannotation. If given, the test driver will skip the annotated test function and use the reason string to log a message.
main.dartlibrary that was previously used to run the
content_shellexecutable for headless dartium testing. This had been broken since the Dart SDK removal of
testDriverparameter to the
reflectTestsfunction; the default
unittestpackage as before but this change allows for other future implementations.
timeoutparameter to the
reflectTests()function with default value of 30 seconds.
Testfunctions that was added in the previous version. This was decidedly a bad idea, as the goal of the
TestRuncontext is to allow a set of test functions to be run across multiple implementations. As such, only the
Teardownfunctions should have access to the implementation context.
Testfunctions to declare 1 parameter of type
TestRunto receive the run context in addition to the
runsparameter to the
@TestGroupannotation, which defaults to
['']. This provides a mechanism to declare multiple runs of a test group as a list of identifiers. Any
Teardownfunction may now declare 1 parameter of type
TestRunobject provides a context specific to each run of the test group, including its identifer and run count.
descriptionparameter of the
TestGroupconstructor from an optional to a named optional; this is a breaking change that was necessary to accomodate the new
runsnamed optional parameter.
@ExpectError()to clarify that it may be used to expect both thrown errors and errors that are completed asynchronously through the test's future.
@ExpectThrows()on asynchronous test functions.
lib/main.dartscript; the trouble with the snapshot was that every time a new Dart SDK release was being pushed the snapshot would be corrupt, so packages relying on it to perform continuous integration tests (on drone.io, for example) would fail when the new SDK release was pushed. I don't see a good solution in the short-term so it is best to use a dart script. The
tool/make_snapshot.dartscript remains for those interested in generating a snapshot on their own.
bench.dartlibrary for users to import. The
main()function was renamed to
reflectTests()to better reflect what it does, and to free up
main()for future work.
Add a very primitive test runner for running headless browser tests via
content_shell --dump-render-tree. The snapshot is in the
lib/ directory for
now so that it is visible to applications that list
bench as a dependency. It
can be used from such an application's root directory in the following manner:
dart packages/bench/runner test/my_browser_harness.html
Testmirrored invocations that return
Future; the returned future is now passed correctly to the
@Group()in the test runner.
@Teardowninvocation in the test runner.
qualifiedNameas the default group name when none is specified with
@Group()annotations are ignored because support for reflection of metadata on library declarations is not yet implemented.
@ExpectThrows()annotation which takes an optional
unittestpackage. The default matcher is
example/browser.htmlto demonstrate usage with html configuration.
unittestpackage. For benchmarks, please use the
benchmark_harnesspackage. We may enhance this package to provide support for the
benchmark_harnessin the future, if there is demand.
Add this to your package's pubspec.yaml file:
dependencies: bench: "^0.4.4"
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.4.4||Nov 24, 2015|
|0.4.3||Oct 11, 2014|
|0.4.2||Sep 21, 2014|
|0.4.1||Jun 20, 2014|
|0.4.0||May 29, 2014|
|0.3.0||May 25, 2014|
|0.2.27||May 19, 2014|
|0.2.26||Apr 16, 2014|
|0.2.25||Mar 5, 2014|
|0.2.24||Feb 19, 2014|
We analyzed this package, and provided a score, details, and suggestions below.
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Detected platforms: web, other
Strong-mode analysis of
lib/src/reflect_tests.dartfailed with the following error:
line: 27 col: 51
The function expression type '(MethodMirror) → bool' isn't of type '(DeclarationMirror) → bool'. This means its parameter or return type does not match what is expected. Consider changing parameter type(s) or the returned type(s).
Fix issues reported by
dartanalyzerreported 1 error(s) and 0 warning(s).
The description is too short.
Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.
Package is pre-v1 release.
While there is nothing inherently wrong with versions of
0.*.*, it usually means that the author is still experimenting with the general direction API.
Maintain an example.
None of the files in your
example/directory matches a known example patterns. Common file name patterns include:
example.dartor you could also use