Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-09

FPCUnit IDE add-on to create unit tests

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I noticed there is a fpcunit IDE add-on package include with Lazarus. Unfortunately it is extremely basic in functionality - it can only create a new empty test unit.

Does anybody know of an add-on package that actually allows you to select a class, tick (select) which properties to test, and then in generates a test class and implements skeleton test methods for all those selected properties? I believe (I could be wrong) this is how Delphi's DUnit integration works too.

Something like that will be a huge time-saver I think.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys: I noticed there is a fpcunit IDE add-on package include with Lazarus. Unfortunately it is…
Graeme Geldenhuys wrote 13 lines
Hi, I noticed there is a fpcunit IDE add-on package include with Lazarus. Unfortunately it is extremely basic in functionality - it can only create a new empty test unit. Does anybody know of an add-on package that actually allows you to select a class, tick (select) which properties to test, and then in generates a test class and implements skeleton test methods for all those selected properties? I believe (I could be wrong) this is how Delphi's DUnit integration works too. Something like that will be a huge time-saver I think.

See the 3.0.0 RC1 pas2ut : "pas 2 unit test"

it's in svn under utils.

I didn't manage to integrate it in lazarus yet.

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
See the 3.0.0 RC1 pas2ut : "pas 2 unit test" it's in svn under utils.

Fantastic, I'll take a look now.

If nobody has a unit test solution like Delphi does, I thought I creating it myself. It will take a bit of time though - got to learn the IDE internals again as I haven't written a add-on for Lazarus in ages.

In the mean time I was considering opening the units with Delphi, just to see if it will generate the test cases for me. Save me tons of time - if it works. :)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 12 lines
On 2015-09-11 17:16, Michael Van Canneyt wrote: > > See the 3.0.0 RC1 pas2ut : "pas 2 unit test" > > it's in svn under utils. Fantastic, I'll take a look now. If nobody has a unit test solution like Delphi does, I thought I creating it myself. It will take a bit of time though - got to learn the IDE internals again as I haven't written a add-on for Lazarus in ages.

Don't hesitate to ask.

Mattias

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys: Fantastic, I'll take a look now. If nobody has a unit test solution like Delphi does, I…
Graeme Geldenhuys wrote 16 lines
On 2015-09-11 17:16, Michael Van Canneyt wrote: > > See the 3.0.0 RC1 pas2ut : "pas 2 unit test" > > it's in svn under utils. Fantastic, I'll take a look now. If nobody has a unit test solution like Delphi does, I thought I creating it myself. It will take a bit of time though - got to learn the IDE internals again as I haven't written a add-on for Lazarus in ages. In the mean time I was considering opening the units with Delphi, just to see if it will generate the test cases for me. Save me tons of time - if it works. :)

FPC has all you could ever need ;)

If you need help writing the IDE add-on, Mattias or me will be glad to help.

Michael.

Reply by email