473,413 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

How to log unittest results?

I like to use unittest. However, when my QA Manager shows up in my
cube and says "Give me evidence that all your unit tests passed", I
have nothing to provide. I'd like to log the unittest results
(verbose mode) somehow. I'm open: logger module, stdmsg redirect,
whatever.

Thanks.
Jul 18 '05 #1
3 1937
In article <af**************************@posting.google.com >,
er*********@earthlink.net (EricN) wrote:
I like to use unittest. However, when my QA Manager shows up in my
cube and says "Give me evidence that all your unit tests passed", I
have nothing to provide. I'd like to log the unittest results
(verbose mode) somehow. I'm open: logger module, stdmsg redirect,
whatever.

Thanks.


Unless you're doing something very unusual, most unit test suites run in
a very short amount of time. When PHB asks if your unit tests pass,
just run them and demonstrate.

If you really want to archive evidence of them having run in the past, I
would think the simpliest way would be to capture the output with the
script command (assuming a unix-like environment).

In one sense, all that really matters is that all your unit tests pass
NOW. What does it matter if you can show evidence that they ran
yesterday if you've broken the code since then? Of course, PHB's being
what they are, recording your test runs with script may be what it takes
to keep him off your back :-)
Jul 18 '05 #2

"EricN" <er*********@earthlink.net> wrote in message
news:af**************************@posting.google.c om...
I like to use unittest. However, when my QA Manager shows up in my
cube and says "Give me evidence that all your unit tests passed", I
have nothing to provide. I'd like to log the unittest results
(verbose mode) somehow. I'm open: logger module, stdmsg redirect,
whatever.
I'd start by asking him what he wants as evidence. I'd also ask
him if he want's to be shown how his people can run the test
scripts and verify that they all pass for themselves.

John Roth
Thanks.

Jul 18 '05 #3
On 7 Jan 2004 13:05:59 -0800, er*********@earthlink.net (EricN) wrote:
I like to use unittest. However, when my QA Manager shows up in my
cube and says "Give me evidence that all your unit tests passed", I
have nothing to provide. I'd like to log the unittest results
(verbose mode) somehow. I'm open: logger module, stdmsg redirect,
whatever.


Another way to pacify the QAM would be to show the version control
log. If you check your stuff in at each stage, and have comments
saying what was fixed (e.g., "passed unittest XYZZY"), that should be
sufficient for QA purposes. QA confirms that the process is being
followed--not that the code works.

Sorry I can't help, but why would your QAM care about this level of
detail? Unless your code is looking bad (i.e., high defect density)
later, when it's integrated, your personal development process, i.e.,
using unittest or not, is too low-level of a detail. MicroQAM. Does
your QAM also want to see marked up printouts of your code, showing
that you performed a code review? Design review? Etc?

--dang
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Remy Blank | last post by:
Hello unittest users, In a project I am working on, I have a series of tests that have to be run as root, and others as a normal user. One solution is to separate the tests into two different...
0
by: Remy Blank | last post by:
Ok, here we go. I added the possibility for tests using the unittest.py framework to be skipped. Basically, I added two methods to TestCase: TestCase.skip(msg): skips unconditionally...
1
by: Thomas Heller | last post by:
I'm trying to integrate some doctest tests with unittest. The tests must be exposed as one or more subclasses of unittest.TestCase, so I'm collecting them with a call to doctest.DocTestSuite(),...
1
by: James Jeffers | last post by:
I couldn't find any resource that addresses output from the unittest package in python 2.4.x. I can't beleive that there isn't an output formatter/test runner for the unittest package.. surely some...
7
by: Jorgen Grahn | last post by:
I have a set of tests in different modules: test_foo.py, test_bar.py and so on. All of these use the simplest possible internal layout: a number of classes containing test*() methods, and the good...
3
by: David Vincent | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hello I'm hoping to get some insight into a situation that seems odd to me. My Python experience is limited; I've just started using the unittest module....
2
by: Oleg Paraschenko | last post by:
Hello, I decided to re-use functionality of "unittest" module for my purposes. More precisely, I have a list of folders. For each folder, code should enter to the folder, execute a command and...
0
by: Chris Fonnesbeck | last post by:
I have built the following unit test, observing the examples laid out in the python docs: class testMCMC(unittest.TestCase): def setUp(self): # Create an instance of the sampler...
1
by: mosquitogrande | last post by:
Hi, I am new to unittest and i would like to know if it is possible to catch the results(which are shown in the console) of the tests in a separate file (text file for example). I would like to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.