473,762 Members | 8,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1957
In article <af************ **************@ posting.google. com>,
er*********@ear thlink.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*********@ea rthlink.net> wrote in message
news:af******** *************** ***@posting.goo gle.com...
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*********@ear thlink.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
1825
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 files, and run the right one. I don't like this too much, as I prefer to group tests by "function". Another solution is to build the test suite differently, depending
0
2054
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 TestCase.skipIf(expr, msg): skips if expr is true These can be called either in setUp() or in the test methods. I also added reporting of skipped tests to TestResult, _TextTestResult and
1
1510
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(), and then add them to a TestCase class I have created. The tests seem to run, but they always seem to succeed - I have no idea why. Any ideas? Thomas ---snip---
1
2718
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 needed this before. Is there a working group or package maintainer for these kinds of features? Thanks in advance, James
7
2073
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 old lines at the end: if __name__ == "__main__": unittest.main() This is great, because each of the modules are runnable, and I can select classes or tests to run on the commandline if I want to. However, running all the tests from e.g. a...
3
3435
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. I've had some experience with unit test support in other languages.
2
2457
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 assert the output. It's reasonable to use "unittest" here, but the problem is that "unittest" doesn't support (== I haven't found how) dynamic creation of tests. I thought it would be very easy, but due to lack of closures in Python (more...
0
2316
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 self.sampler = DisasterSampler()
1
1359
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 keep track of the results but in a easier and more significant manner, something like: test_function1.........FAIL test_function2........ok and so on I write the code in eclipse.
0
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9378
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10137
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9927
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
3510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.