Code

Opened 6 years ago

Closed 4 years ago

#7884 closed (fixed)

Test framework needs option to run tests and return statuses

Reported by: devin Owned by: devin
Component: Testing framework Version: master
Severity: Keywords:
Cc: devin@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Currently the test framework just uses a unittest.TextTestRunner to run tests and output results to stderr. It would be nice to support an alternate TestRunner that would return results instead.

This would be particularly useful for running automated tests and storing test results. Currently for our automated testing, I'm having to regex the stderr for results. Not ideal.

I'm going to go ahead and write a patch for this

Attachments (2)

result_test_runner_r8055.diff (2.8 KB) - added by devin 6 years ago.
patch and doc changes
result_test_runner_r10680.diff (3.1 KB) - added by arthurk 5 years ago.
Updated patch for r10680

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by devin

patch and doc changes

comment:1 Changed 6 years ago by devin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

I wrote the patch to add this functionality by passing an optional unittest.TestResult to run_tests. Of course you could just write your own run_tests test runner, but it seems this is something we should be supporting.

comment:2 Changed 6 years ago by devin

  • Has patch set

comment:3 Changed 6 years ago by russellm

  • milestone set to post-1.0
  • Triage Stage changed from Design decision needed to Accepted

A good idea, but if we're going to hit v1.0 we're going to need to defer for a while.

comment:4 Changed 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

Changed 5 years ago by arthurk

Updated patch for r10680

comment:5 Changed 4 years ago by ericholscher

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.