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 <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 <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.
>
> 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
>
>
> ------------------------------------------------------------------------------
> 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
>
>
>
> ------------------------------------------------------------------------------
> 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
>
>
------------------------------------------------------------------------------
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

Reply via email to