Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: why don't many test frameworks support file-output?

Reply
Thread Tools

Re: why don't many test frameworks support file-output?

 
 
kanchy kang
Guest
Posts: n/a
 
      02-24-2006

I don't think redirecting stdout to a file is a good resolution.
How to organize the output file is very important.
in my imagination, there should be one directory "log", where log files are
saved.
and, log files should be separated according to some method(for example, one
test file one log file).

also, from my point of view, there is one confusion between "log files" and
normal stdout stream.

stdout stream is used to display some imediate information, for example,
"print" statement, or exception also can be outputed to the screen...

but, stdout stream can't satisfy many requirements...
for example, in one "big" project, there are many test cases, in which we
need record many useful data, whether correct or not. how to do this? print
statement is not a good idea.

there should be another "stream" to do this. it can record infomation, same
to stdout or not.
so, a good log frame will satisfy:
1) "log" is not the stdout stream.
2) log files are oganized systematically, not only one big log file.
3) log information should be written to file imediately, not be delayed
until one case is finished. why?
test script writter may not know the test framework. if he/she write one
test case with many output data(maybe it is necesary), this will consume the
system memory greatly, ...
4) also, log directory should be one limited cyclic...for example, from 1 to
10.
this will avoid imediate overwriting...sometimes the previous log
information would be useful.

....hehe...

best regards.


>From: Benji York <(E-Mail Removed)>
>To: kanchy kang <(E-Mail Removed)>
>CC: http://www.velocityreviews.com/forums/(E-Mail Removed)
>Subject: Re: why don't many test frameworks support file-output?
>Date: Thu, 23 Feb 2006 14:55:07 -0500
>
>kanchy kang wrote:
>>i browsed the following frameworks briefly: nose, OOBTest,
>>testosterone, py.test, Sancho ... and found out they do support imediate
>>screen-output only.

>
>You can redirect stdout to a file.
>--
>Benji York


__________________________________________________ _______________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/g...ave/direct/01/

 
Reply With Quote
 
 
 
 
Scott David Daniels
Guest
Posts: n/a
 
      02-24-2006
kanchy kang wrote:
>
> I don't think redirecting stdout to a file is a good resolution.

Nobody is suggesting:
python program.py >output
or
program.py >output

What is being suggested is:
import sys
import module
original, sys.stdout = sys.stdout, open('output', 'w')
try:
module.main()
finally:
result, sys.stdout = sys.stdout, original
size = result.tell()
result.close()
print size, 'bytes written to file "output"'

If, however, you want everyone else to conform to your personal idea
of "best practices," then hire them and tell them to do it your way.

--Scott David Daniels
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
why so many frameworks? Can you just put all best ideas in 1? gavino Java 26 10-30-2006 03:18 PM
why don't many test frameworks support file-output? kanchy kang Python 2 02-24-2006 09:01 AM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments