You can use foldts-test-suite <https://docs.racket-lang.org/rackunit/internals.html?q=foldts-test-suite#%28def._%28%28lib._rackunit%2Fmain..rkt%29._foldts-test-suite%29%29> (part of the rackunit package) to write your own test runner which collects and reports on the tests according to your needs. This will only work for the rackunit tests which are organized in test suites and test cases, not with simple `check-*` written inside test modules.
I used it myself to write a test runner which runs rackunit tests and outputs the results as JUnit XML test files. This is a widely supported test result format that can be imported into test reporting applications. Alex. On Saturday, May 23, 2020 at 7:47:47 AM UTC+8, Shriram Krishnamurthi wrote: > > I'm trying to understand the design of the logging portion of rackunit: > > > https://docs.racket-lang.org/rackunit/Testing_Utilities.html#%28part._.Logging_.Test_.Results%29 > > 1. The "log" seems to only be a *count*, not the actual rackunit > output (as the term "log" would suggest). Since I want to show a summary > of > tests — including output — on a different medium, after the test suite has > run, it looks like I need to essentially create my own logging support? > (Perhaps the "check-info stack" is useful here, but I don't think so.) > 2. Why do the check-… procedures not return any value? It would seem > natural for them to return, say, false in case of passing and a failure > information structure in case of failing (or a structure in both cases). > But they seem to only return void, so I'm not entirely sure how else to > extract the information for the log without rewriting the check's. > 3. As an aside, I'm not entirely sure what `test-log!` is there for. > Presumably it's to record in the log "tests" run by operations that are > not > part of rackunit? I'm curious how people have used it. > > TL;DR: If I want to record what happened on all the checks for > post-execution processing, do I need to (a) create my own log and, to do > so, (b) rewrite all the checking predicates to provide the information that > the detailed log needs? > > Thanks, > Shriram > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/87df942e-e1b7-4410-9df0-5d903452291f%40googlegroups.com.