Index: modules/simpletest/drupal_reporter.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_reporter.php,v
retrieving revision 1.2
diff -u -p -r1.2 drupal_reporter.php
--- modules/simpletest/drupal_reporter.php	10 May 2008 06:55:09 -0000	1.2
+++ modules/simpletest/drupal_reporter.php	21 May 2008 05:07:41 -0000
@@ -58,10 +58,11 @@ class DrupalReporter extends SimpleRepor
   function paintPass($message, $group) {
     parent::paintPass($message);
     if ($group == 'Other') {
-      $group = t($group);
+      $info = $this->test_info_stack[count($this->test_info_stack) - 1];
+      $group = $info['name'];
     }
     $this->test_stack[] = array(
-      'data' => array($message,  "<strong>[$group]</strong>", t('Pass'), theme('image', 'misc/watchdog-ok.png')),
+      'data' => array($message,  array('data' => "<strong>$group</strong>", 'class' => 'simpletest-group'), t('Pass'), theme('image', 'misc/watchdog-ok.png')),
       'class' => 'simpletest-pass',
     );
   }
@@ -77,10 +78,11 @@ class DrupalReporter extends SimpleRepor
   function paintFail($message, $group) {
     parent::paintFail($message);
     if ($group == 'Other') {
-      $group = t($group);
+      $info = $this->test_info_stack[count($this->test_info_stack) - 1];
+      $group = $info['name'];
     }
     $this->test_stack[] = array(
-      'data' => array($message, "<strong>[$group]</strong>", t('Fail'), theme('image', 'misc/watchdog-error.png')),
+      'data' => array($message, array('data' => "<strong>$group</strong>", 'class' => 'simpletest-group'), t('Fail'), theme('image', 'misc/watchdog-error.png')),
       'class' => 'simpletest-fail',
     );
   }
@@ -94,7 +96,7 @@ class DrupalReporter extends SimpleRepor
   function paintError($message) {
     parent::paintError($message);
     $this->test_stack[] = array(
-      'data' => array($message, '<strong>[PHP]</strong>', t('Exception'), theme('image', 'misc/watchdog-warning.png')),
+      'data' => array($message, array('data' => "<strong>PHP</strong>", 'class' => 'simpletest-group'), t('Exception'), theme('image', 'misc/watchdog-warning.png')),
       'class' => 'simpletest-exception',
     );
   }
@@ -121,16 +123,17 @@ class DrupalReporter extends SimpleRepor
     $this->writeToLastField($this->form, array(
       '#type' => 'fieldset',
       '#title' => $test_name,
+      '#attributes' => array('class' => 'simpletest-results'),
       '#weight' => $this->weight++,
     ), $this->form_depth);
 
-    if (! isset($this->_size)) {
+    if (!isset($this->_size)) {
       $this->_size = $size;
     }
 
     if (($c = count($this->test_info_stack)) > 0) {
       $info = $this->test_info_stack[$c - 1];
-      $this->writeContent('<strong>' . $info['name'] . '</strong>: ' . $info['description'], $this->getParentWeight() );
+      $this->writeContent('<strong>' . $info['name'] . '</strong>: ' . $info['description'], $this->getParentWeight());
     }
 
     $this->_test_stack[] = $test_name;
@@ -174,7 +177,7 @@ class DrupalReporter extends SimpleRepor
       $this->writeToLastField($this->form, $write, $this->form_depth);
     $this->writeContent('<strong>' . $this->getPassCount() . '</strong> passes, <strong>' . $this->getFailCount() . '</strong> fails and <strong>' . $this->getExceptionCount() . '</strong> exceptions.', $parent_weight, $class);
     if (count($this->test_stack) != 0) {
-        $this->writeContent(theme('table', array(), $this->test_stack));
+        $this->writeContent(theme('table', array(t('Details'), t('Category'), t('Outcome')), $this->test_stack));
         $this->test_stack = array();
       }
     array_pop($this->form_depth);
Index: modules/simpletest/simpletest.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.js,v
retrieving revision 1.2
diff -u -p -r1.2 simpletest.js
--- modules/simpletest/simpletest.js	23 Apr 2008 18:50:49 -0000	1.2
+++ modules/simpletest/simpletest.js	21 May 2008 05:07:41 -0000
@@ -27,6 +27,7 @@ Drupal.behaviors.simpleTestMenuCollapse 
     }
   });
 }
+
 Drupal.behaviors.simpleTestSelectAll = function() {
   $('td.simpletest-select-all').each(function() {
     var checkboxes = Drupal.settings.simpleTest['simpletest-test-group-'+ $(this).attr('id')].testNames, totalCheckboxes = 0,
@@ -60,4 +61,34 @@ Drupal.behaviors.simpleTestSelectAll = f
     }
     $(this).append(checkbox);
   });
+};
+
+Drupal.behaviors.simpleTestFilterForm = function() {
+  var refreshAll = function() {
+    $('tr.simpletest-pass, tr.simpletest-fail, tr.simpletest-exception').show();
+    if ($('#edit-outcome-pass').is(':not(:checked)')) {
+      $('tr.simpletest-pass').hide();
+    }
+    if ($('#edit-outcome-fail').is(':not(:checked)')) {
+      $('tr.simpletest-fail').hide();
+    }
+    if ($('#edit-outcome-exception').is(':not(:checked)')) {
+      $('tr.simpletest-exception').hide();
+    }
+    groupFilter();
+    $('fieldset.simpletest-results').each(function() {
+      $(this)[$(this).find('tr:visible').length <= 1 ? 'hide' : 'show']();
+    });
+  };
+  var groupFilter = function(parentFieldset) {
+    var text = $('input#edit-group').val();
+    $('tr > td.simpletest-group > strong').each(function() {
+      var group = $(this).text().toLowerCase();
+      if (group.indexOf(text.toLowerCase()) == -1) {
+        $(this).parent().parent().hide();
+      }
+    });
+  };
+  $('input.simpletest-filter:checkbox').change(refreshAll);
+  $('input.simpletest-filter:text').keyup(refreshAll);
 };
\ No newline at end of file
Index: modules/simpletest/simpletest.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.module,v
retrieving revision 1.3
diff -u -p -r1.3 simpletest.module
--- modules/simpletest/simpletest.module	10 May 2008 07:46:22 -0000	1.3
+++ modules/simpletest/simpletest.module	21 May 2008 05:07:42 -0000
@@ -85,7 +85,7 @@ function simpletest_entrypoint() {
   $output = drupal_get_form('simpletest_overview_form');
 
   if (simpletest_running_output()) {
-    return simpletest_running_output() . $output;
+    return drupal_get_form('simpletest_filter_form') . simpletest_running_output() . $output;
   }
   else {
     return $output;
@@ -473,5 +473,35 @@ function simpletest_settings() {
   );
 
   return system_settings_form($form);
-
 }
+
+/**
+ * FAPI callback for the SimpleTest filter-test-results form.
+ */
+function simpletest_filter_form() {
+  $form = array();
+  $form['outcome'] = array(
+    '#type' => 'checkboxes',
+    '#title' => t('Filter by outcome'),
+    '#options' => array(),
+    '#attributes' => array('class' => 'container-inline'),
+    '#default_value' => array(),
+  );
+  $categories = array('pass' => t('Passes'), 'fail' => t('Fails'), 'exception' => t('Exceptions'));
+  foreach ($categories as $outcome => $readable) {
+    $form['outcome'][$outcome] = array(
+      '#type' => 'checkbox',
+      '#title' => $readable,
+      '#attributes' => array('class' => 'simpletest-filter'),
+      '#default_value' => TRUE,
+    );
+  }
+  $form['group'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Filter by category'),
+    '#length' => 20,
+    '#default_value' => '',
+    '#attributes' => array('class' => 'container-inline simpletest-filter'),
+  );
+  return $form;
+}
\ No newline at end of file
Index: modules/simpletest/simpletest.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.php,v
retrieving revision 1.2
diff -u -p -r1.2 simpletest.php
--- modules/simpletest/simpletest.php	10 May 2008 06:55:09 -0000	1.2
+++ modules/simpletest/simpletest.php	21 May 2008 05:07:42 -0000
@@ -316,7 +316,7 @@ class SimpleStackTrace {
         continue;
       }
       if ($this->_frameMatchesPrefix($frame)) {
-        return ' at [' . $frame['file'] . ' line ' . $frame['line'] . ']';
+        return ' at [' . str_replace('\\', '/', substr(str_replace(getcwd(), '', $frame['file']), 1)) . ' line ' . $frame['line'] . ']';
       }
     }
     return '';
