guinness icon indicating copy to clipboard operation
guinness copied to clipboard

Update to support the new test package

Open kevmoo opened this issue 9 years ago • 9 comments

This won't be a small update, but it will give a lot of power to your users.

https://github.com/dart-lang/test https://groups.google.com/a/dartlang.org/d/msg/announce/BdYTxNKzark/lcR-K1sTOEwJ

kevmoo avatar Apr 24 '15 22:04 kevmoo

@vsavkin Would you like help with this? We're moving a lot of folks over. It'd be great if Angular came along.

kevmoo avatar May 27 '15 03:05 kevmoo

Could you submit a PR updating to the new test package?

vsavkin avatar May 28 '15 01:05 vsavkin

@kevmoo I just realized package:test doesn't support isolating tests from test code (https://github.com/dart-lang/test/issues/127). I don't think guinness should migrate until package:test supports proper test isolation.

yjbanov avatar Jun 17 '15 17:06 yjbanov

@yjbanov Huh? I'm confused.

You can drive the runner to run whichever tests you want.

You shouldn't need solo_test or similar for this.

kevmoo avatar Jun 18 '15 00:06 kevmoo

@kevmoo

We don't need it, but we want it. Many coding workflows assume you are not switching away from the code editor, not even moving your hand to go grab the mouse. For example, Karma reruns your tests continuously by watching the file system. In such a workflow, there's not even a place to enter the things the new test runner requires that we enter to isolate and run tests, such as the test name or the -N option, etc. You simply annotate the code and save the file and your isolated tests run. It's frequently an extremely fast edit/test cycle, on the order of seconds between each step. Having to go to the command-line and type out a command to run the tests is many time slower.

yjbanov avatar Jun 18 '15 00:06 yjbanov

Done - see https://pub.dartlang.org/packages/guinness_2

This supports exclusive (solo) tests via its own fancy wrappers.

For the record - I would also like to see dart:test natively implement exclusive test.

juliemr avatar Jul 22 '15 00:07 juliemr

Hmm, one problem. My new package (now moved to https://pub.dartlang.org/packages/guinness2) has iit and ddescribe, but they only work within one file (see https://github.com/juliemr/guinness2/issues/1).

As far as I can tell, the only way to get around this without patching dart:test is to have one master test file which kicks off all the smaller ones. @kevmoo @nex3 any ideas on how I can get around that? Or is the master test file the best way?

juliemr avatar Jul 22 '15 02:07 juliemr

In general, it's not going to be possible to have an exclusive test work across suites, no matter how deeply it's supported in the test runner. It doesn't load all the suites at once; it has a rolling window of suites that are loaded and running at any given time, to ensure that it doesn't run out of memory. So it's always going to be possible that there's an exclusive test in a suite that hasn't even been loaded yet, and we can't know that until we've already finished running all the tests in an earlier suite and unloaded it.

nex3 avatar Jul 22 '15 22:07 nex3

+1

rightisleft avatar Sep 19 '15 20:09 rightisleft