olegantonyan / googletest

Automatically exported from code.google.com/p/googletest. Added qmake build
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Add command line option to pause output on failure #190

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When running a console program in debug mode it opens a command window that
exits when the program exits. So by default you see a flash of a console
window and cannot read the output. If all tests pass, I don't really want
to see the output, but if it fails, I very much do.

So I propose adding a command line parameter that adds a press any key
prompt at the end if any tests failed. This would only be enabled if the
command line parameter was added so would not affect any existing users.

Original issue reported on code.google.com by dalewk...@gmail.com on 1 Sep 2009 at 1:40

GoogleCodeExporter commented 9 years ago
We'd like to keep gtest simple.

There are several alternative ways to get what you want (or something
close):

- set the console window buffer size to a larger value such that you
  can scroll back to see the entire test output.

- use a continuous build system that can display the XML report
  generated by gtst (e.g. Hudson).

- pipe the test output to 'less' (or 'more' on Windows).

- redirect the test output to a file and read it later.

- run the test inside Emacs.

- run the test in an IDE (e.g. Visual Studio).

- (when the event listner API is published) implement a custom output
  printer that can pause on failure.

Therefore we'd like to avoid a new command line flag.

Original comment by zhanyong...@gmail.com on 3 Sep 2009 at 6:39