Closed GoogleCodeExporter closed 8 years ago
Out of date docs. Updated:
* `all` special keyword to run all of the tests.
* `TestCaseName` run all tests for that test case.
* `TestCaseName#testName` run only the specified test, useful when debugging a single test. See DebuggingWithJsTestDriver.
* Additionally, it accepts regular expressions for any part of the string. '#' is reserved, and unexpected results may happen when using # in a test name.
Original comment by corbinrs...@gmail.com
on 9 Apr 2012 at 5:33
That was fast! Thanks.
Original comment by jer...@syapse.com
on 9 Apr 2012 at 5:37
Shoot, I spoke too soon; even with the updated syntax I have the same problem.
When I run JSTD 1.3.4.b on Firefox/Linux with the following tests arg:
--tests SearchModelJSONTest#testCreateSubObjectPattern
JSTD runs both my "testCreateSubObjectPattern" test and my
"testCreateSubObjectPatternWithConstraint" (which is also in my
SearchModelJSONTest test case).
Original comment by jer...@syapse.com
on 9 Apr 2012 at 5:44
It's a js regex, so usual rules apply. :)
Try SearchModelJSONTest#testCreateSubObjectPattern$
Original comment by corbinrs...@gmail.com
on 9 Apr 2012 at 5:47
Dunno if this helps, but here's a snippet of a run with runnerMode=DEBUG:
Apr 9, 2012 10:45:54 AM com.google.jstestdriver.CommandTask run
FINE: Starting
{"command":"runTests","parameters":["[\"SearchModelJSONTest#testCreateSubObjectP
attern\"]","false","1"]} for 1333987937145
.FApr 9, 2012 10:45:58 AM com.google.jstestdriver.CommandTask run
FINE: finished
{"command":"runTests","parameters":["[\"SearchModelJSONTest#testCreateSubObjectP
attern\"]","false","1"]} for 1333987937145 with TEST_RESULT
Apr 9, 2012 10:45:58 AM com.google.jstestdriver.CommandTask run
FINE: finished
{"command":"runTests","parameters":["[\"SearchModelJSONTest#testCreateSubObjectP
attern\"]","false","1"]} for 1333987937145
Apr 9, 2012 10:45:58 AM com.google.jstestdriver.browser.BrowserActionRunner call
FINE: stopping session on 1333987937145 with id
05c28962-1281-41de-a522-4afe47fa7a98
Apr 9, 2012 10:45:58 AM
com.google.jstestdriver.browser.BrowserActionExecutorAction run
FINE: Finished BrowserActions [com.google.jstestdriver.RunTestsAction@315b0333].
Total 2 tests (Passed: 1; Fails: 1; Errors: 0) (3646.00 ms)
Let me know if a full log would be helpful.
Original comment by jer...@syapse.com
on 9 Apr 2012 at 5:48
Ahhh, sorry posted right after you. Adding a $ to the end did fix things and
make only one test run.
Original comment by jer...@syapse.com
on 9 Apr 2012 at 5:48
That being said, it's possible that not everyone who uses JSTD will figure out
that they have to use a regex (with a $), even if you put it in the docs
(although I guess it depends on how prominently you mention it, and whether or
not its included in --help).
Just a thought: it might be nice to have either a --test argument (that one
could use in place of --tests when they only want to run a specific test by
name), or a --named-tests-only argument that could be used in conjunction with
--tests to "turn of" regex matching. Certainly not an important feature, but
it might be nice (especially for JSTD noobs) since wanting to run just one test
is pretty common.
Original comment by jer...@syapse.com
on 9 Apr 2012 at 5:57
Original issue reported on code.google.com by
jer...@syapse.com
on 9 Apr 2012 at 5:18