Bug Tracker

Ticket #2738 (closed enhancement: fixed)

Opened 9 months ago

Last modified 9 months ago

Smarter GET variables for the test runner

Reported by: flesler Assigned to: joern
Type: enhancement Priority: major
Milestone: 1.2.3 Component: qunit
Version: 1.2.3 Keywords: tests runner get variables not filter module
Cc: Needs: Review

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

testrunner-getvars.diff (1.1 kB) - added by flesler 9 months ago.

Change History

Changed 9 months ago by flesler

Changed 9 months 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.

Changed 9 months ago by flesler

Committed the changes at [5315].

Changed 9 months ago by joern

  • status changed from new to closed
  • resolution set to fixed

Works fine. Needs some documentation though.

Note: See TracTickets for help on using tickets.