Browse files

Add ability to run only one suite

When working on a feature it is often nice to be able to run one
particular suite. This patch modifies webui so that it reacts to
a suite name being a part of a query string:

  http://localhost:7777/ <-- runs all tests
  http://localhost:7777/BasicTests <-- runs only BasicTests

There's no UI for this yet because I'm not sure what's the best
solution.

Even though the solution is partial it closes GH-23.
  • Loading branch information...
1 parent b30940d commit ce1d5b6f5e904c090eec84242c36a217586b5f53 @valueof valueof committed May 16, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/webui/webui.js
View
6 src/webui/webui.js
@@ -12,7 +12,13 @@ var hiro, main;
hiro = new Hiro();
main = function () {
+ var qs = window.location.search.slice(1).split('.');
+ var req = qs.length ? qs[0] : null;
+
_.each(hiro.suites, function (suite, name) {
+ if (req && req !== name)
+ return;
+
var view = new SuiteView(name, suite);
size += _.reduce(_.keys(suite.methods), function (memo, name) {

0 comments on commit ce1d5b6

Please sign in to comment.