Ticket #2738 (closed enhancement: fixed)
Smarter GET variables for the test runner
| Reported by: | flesler | Owned by: | joern |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.3 |
| Component: | qunit | Version: | 1.2.3 |
| Keywords: | tests runner get variables not filter module | Cc: | |
| Blocking: | Blocked by: |
Description
With this patch, the test runner can be customized some more.
It accepts things like this:
/jquery/test/?core&event /jquery/test/?!ajax&!selector /jquery/test/?core&!makeArray
The logic behind is like this:
If no restriction is found then
execute all.
Else if(when) there's a match, then
If it's a not(!)
dont execute this test
Else
execute this test
Else if it's a not
Signal this as ok, but keep checking
This logic allows multiple nots, it seemed to me like the expected behavior. I consider this very useful to run only a couple of tests, or specially a !ajax tests (it nearly hangs for me).
Additionally, I added a test that fails until the patch is accepted (by Jörn's request at #2619). We could have some kind of name agreement that this kind of tests, include an "experimental:" or something like that.
Then you can run test/?!experimental: to avoid seeing useless failures.
I hope this is useful.
Attachments
Change History
comment:1 Changed 5 years ago by joern
I've refactored the filtering ([5307]), but was unable to apply your patch. Could you adjust it to the current revision?
Also, for some reason, when applying a patch from you, my svn client shows me that the whole file changed. Odds are good that my Eclipse or Eclipse SVN plugin screw it up. Anyway, could you check that you use UTF-8 and unix-line-delimiters when creating your patches?
Anyway, its really hard to exclude tests via regex, eg. blacklist instead of whitelist, so I like your approach.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

