Hi John, Yes, that helps a lot, thank you very much! I used the tools that you explained to get my test suite to behave as I find convenient when running as a standalone program: either print out just the test failures, or a "pass" message. Here is the code I am using.
~~~ USING: tools.test io io.streams.null kernel namespaces sequences examples.combinators examples.tuples ; IN: examples.test-suite : test-examples ( -- ) [ "examples" test ] with-null-writer test-failures get empty? [ "All tests passed." print ] [ :test-failures ] if ; MAIN: test-examples ~~~ I appreciate your help! Kind regards, Fred On Tue, Feb 18, 2014, at 09:48 AM, John Benediktsson wrote: You can tell if there are test failures, by something like this: test-failures get empty? "PASS" "FAIL" ? If all you want is to show the test-failures, you can do: :test-failures If you want to suppress output and only show the test failures: USING: io.streams.null ; [ "vocab" test ] with-null-writer :test-failures etc. Does that help? On Tue, Feb 18, 2014 at 6:06 AM, Fred Daoud <[1]fda...@proinbox.com> wrote: Hi Jon, Thank you for your reply. That is indeed helpful when running the tests from the listener. However, I should have been more specific in that I am running the test suite as a standalone program (as you can see, the code includes a MAIN: declaration). When running the test suite from the command line, the output shows "Unit Test: " with the code for each unit test being run, producing a lot of output. If a test fails somewhere in the middle, that test is followed by "--> test failed!". But that is easily buried by the rest of the output, and there is no summary at the end. Any thoughts on this? Thanks again for your help. Fred On Tue, Feb 18, 2014, at 08:51 AM, Jon Harper wrote: Nothing is reported if there are no errors. If there is an error, in the UI listener, the errors are reported by pressing F3 (there's an icon indicating test failures that appears at the bottom of the window). When running the command line listener, a line is printed if there are errors":test-failures - show 1 unit test failures" and running the ":test-failures" word shows a summary of the errors Jon On Tue, Feb 18, 2014 at 1:49 PM, Fred Daoud <[2]fda...@proinbox.com> wrote: Greetings, I am running a suite of unit tests with the following code: ~~~ USING: tools.test examples.combinators examples.tuples ; IN: testsuite : test-examples ( -- ) "examples" test ; MAIN: test-examples ~~~ This correctly runs examples/combinators-tests.factor and examples/tuples-tests.factor. However, the output just scrolls by and there is no summary at the end. I have to scroll back through the output to find out whether there were any failures. Is there a way to run a suite of unit tests and get a clearer PASS/FAIL summary at the end of the output? Thanks in advance for your help, much appreciated! Fred Daoud -------------------------------------------------------------------- ---------- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. [3]http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ ostg.clktrk _______________________________________________ Factor-talk mailing list [4]Factor-talk@lists.sourceforge.net [5]https://lists.sourceforge.net/lists/listinfo/factor-talk ----------------------------------------------------------------------- ------- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. [6]http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ost g.clktrk _______________________________________________ Factor-talk mailing list [7]Factor-talk@lists.sourceforge.net [8]https://lists.sourceforge.net/lists/listinfo/factor-talk -------------------------------------------------------------------- ---------- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. [9]http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ ostg.clktrk _______________________________________________ Factor-talk mailing list [10]Factor-talk@lists.sourceforge.net [11]https://lists.sourceforge.net/lists/listinfo/factor-talk ----------------------------------------------------------------------- ------- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. [12]http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/os tg.clktrk _______________________________________________ Factor-talk mailing list [13]Factor-talk@lists.sourceforge.net [14]https://lists.sourceforge.net/lists/listinfo/factor-talk References 1. mailto:fda...@proinbox.com 2. mailto:fda...@proinbox.com 3. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk 4. mailto:Factor-talk@lists.sourceforge.net 5. https://lists.sourceforge.net/lists/listinfo/factor-talk 6. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk 7. mailto:Factor-talk@lists.sourceforge.net 8. https://lists.sourceforge.net/lists/listinfo/factor-talk 9. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk 10. mailto:Factor-talk@lists.sourceforge.net 11. https://lists.sourceforge.net/lists/listinfo/factor-talk 12. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk 13. mailto:Factor-talk@lists.sourceforge.net 14. https://lists.sourceforge.net/lists/listinfo/factor-talk ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk