[Gambas-user] Tap parser in gb.test

Tobias Boege taboege at gmail.com
Thu May 14 13:28:46 CEST 2020


On Thu, 14 May 2020, Benoît Minisini wrote:
> Le 14/05/2020 à 12:46, Tobias Boege a écrit :
> > On Thu, 14 May 2020, Benoît Minisini wrote:
> > > Hi Christof, Hi Tobias,
> > > 
> > > So I have apparently a TAP parser inside 'gb.test'.
> > > 
> > > How can I use it in the IDE to parse the TAP output so that I can present
> > > test results in a more readable way?
> > > 
> > 
> > The parser class is hidden now, so it can only be used through the TestRunner
> > module. This takes a project directory, starts it under `gbx3 -T` and parses
> > the TAP output into a TestStats object... which I forgot to return from the
> > Run method. It will be available in a few minutes!
> > 
> > If you have TAP saved in a text file or something like that, there is no way
> > to parse it anymore. Also Christof is right in that the parser has a few TODO
> > items left, most notably it doesn't parse subtests yet. These holes should be
> > filled when the first thing that uses the parser is written, which is now?
> > 
> > Regards,
> > Tobi
> > 
> 
> If it had been public, I would have been able to use it in the IDE to plug
> it to the test output and replace the unit test terminal by a better
> presentation.
> 

Let's re-export it then. It breaks the symmetry of not having any TAP part
visible in the component interface, but that's only a minor reason.

Unlike TestRunner, the TapParser is interactive which is certainly nicer
for viewing tests as they run. This makes me wonder if TestRunner should
be interactive (i.e. raise events) as well...?

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list