freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FR-devel] Unit Testing integration (was: Re: Welcome to FR-devel)


From: Baptiste Lepilleur
Subject: Re: [FR-devel] Unit Testing integration (was: Re: Welcome to FR-devel)
Date: Thu, 2 May 2002 12:46:10 +0200

You're welcome. Here is what I have in my head concerning Unit Testing
integration (I'm taking test/unit as a reference since it also support
RUnit):

The user should be able to run the unit tests of a specific file (it may be
a single test case or a test suite (a file that require other test case).

The IDE should collect test failures and statistics (how many tests,
failures...)

A failure should have the following information:
- failed fixture/test names
- assertion location: filename/line
- short description: 'actual value is different from the expect value'
- long description:
    '-Expected:    3125789'
    '-Actual:        3125689'
- backtrace: location of the callers, should be filtered so that it does not
contains test/unit and FreeRIDE callers.

Once the IDE has the failure it can do many things:
- set marker in the Scintilla Edit Control to show failures and/or caller
location, and track them as the code is edited (markers can be made
invisible if needed).
- output text in the console window with some colorizations to help diagnose
failure (emphase the test name and short description for example)

That interface could easily be started now, we can always give it its
definitive shape when we know more about Plug-in/Gui (ruby is really
flexible in that aspect).

We could start by running the unit test in the same process as the IDE, then
later running them in another process for safety. For example, I stumbled on
a bug in ruby extension API which caused the garbage collection to blew up.
We don't want to have the IDE crash later on because of things like this.
But since it is a seldom case, we don't need that for the first version. It
shouldn't have any impacts on the interface anyway.

Notes about Scintilla marker:

Marker are symbol you can put in front of line (like bookmark, debugger
break point, error marker...). When you add a marker, you get an handle on
that marker. That handle can be used to ask the marker for its position.
Marker move with the line in the text. They can be visible or invisible.
They are very useful to implement things like bookmark, jump to error...

If anybody want to tackle this, feel free. This one of the first feature
I'll integrate into Practatical Ruby, so feedback should be quick!

Baptiste.
---
Baptiste Lepilleur <address@hidden>
http://gaiacrtn.free.fr/

----- Original Message -----
From: "Bob Calco" <address@hidden>
To: <address@hidden>
Sent: Thursday, May 02, 2002 6:21 AM
Subject: RE: [FR-devel] Re: Welcome to FR-devel


> Count me (back) in to help with development of the unit testing
plug-in(s).
> I would be happy to play the role of enabler to Baptiste's unit testing
> addiction, at all events I share the same malady.
>
> Signs of unit test withdrawl have been plaguing me lately (on a billable
> assignment at the requirements (read: no coding) phase). The agony!
>
> ;)
>
> Bob Calco
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]