PureUnit -- automated testing framework for PureBasic

Developed or developing a new product in PureBasic? Tell the world about it.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

PureUnit -- automated testing framework for PureBasic

Post by freak »

PureUnit is a testing framework with similar concepts as other xUnit frameworks like JUnit.
It can be used to test your procedures, includefiles or userlibraries or to
do so called "test driven development", where you first write the test for
a procedure and then implement the actual code until the test succeeds.

It comes as a simple set of macros for writing the testcode and a tool
to executed the tests and report the progress/status of the tests.
It is designed to run as a standalone GUI program, to be integrated into
the IDE as a tool or to run from the console, a script or a makefile.

PureUnit requires a 4.10 compiler or newer. (the beta versions will work)
Currently there is a Windows and Linux executable available. A version
for OSX will be provided when there is a 4.10 compiler for OSX.

This started as a small project for me to have a way to easily create and manage
testcodes for the PureBasic library commands, but as is sometimes the case
with my projects, i went into overkill mode and produced a quite useful piece
of software that i don't want to keep away from you guys ;)

Note: We have not decided yet wether this will be a part of the official PB package,
or if i will just release it as a private sideproject. (means less support work).
For now consider this beta, as it has not been tested that intensly yet,
i will keep updating/bugfixing this in any case though, as we use it for our own
development work as well.


You can download the tool here: http://freak.purearea.net/tools/PureUnit03.zip

Please read the 'Readme.txt' and the example for instructions.
Any feedback is welcome...
quidquid Latine dictum sit altum videtur
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

This is a really good idea, especially for those creating libs using tailbite.

Thanks. :)
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

This has got to be part of the official PB releases......

It's a professional tool and will help to promote PB as a professional product, which IMHO, it is :D
Paid up PB User !
User avatar
Comtois
Addict
Addict
Posts: 1429
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

Thank you. It's a great tool :)
Please correct my english
http://purebasic.developpez.com/
johnfinch
User
User
Posts: 45
Joined: Thu May 11, 2006 1:45 am
Location: florida
Contact:

Post by johnfinch »

Excellent! Must be part of the full release, surely... great developers aid.
Thank you
Leopard-parallels-XP-Vista
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Post by Little John »

Thank you for this great tool!
I use it for testing all my important include files. It was a good decision to add PureUnit to the official release.

Just a minor suggestion: Maybe you can add a minimize button to the title bar?

Regards, Little John
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: PureUnit -- automated testing framework for PureBasic

Post by #NULL »

is it possible to use PureUnit in combination with console commands? as soon as my test code contains a PrintN() then PureUnit hangs up and i have to kill it. i tried with PureUnit.exe and PureUnitGui.exe, both with and without the --gui argument.
for example this code file:

Code: Select all

ProcedureUnit mytest()
  
  OpenConsole("title")
  PrintN("bla")
  
  Assert(1 = 1, "fine")
  
EndProcedureUnit
saved as 'test_PureUnit.pb' and then the following run in cmd from the directory containing the the test code:

Code: Select all

"C:\Program Files\PureBasic_5_60_b6\SDK\PureUnit\PureUnitGui.exe" --compiler "C:\Program Files\PureBasic_5_60_b6\Compilers\pbcompiler.exe" --gui test_PureUnit.pb
the tool opens and begins its work but then does not respond. it works if i comment out the PrintN().

ps:
the same result if i open PureUnitGui.exe directly from the explorer and choose the file.
Post Reply