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...
PureUnit -- automated testing framework for PureBasic
PureUnit -- automated testing framework for PureBasic
quidquid Latine dictum sit altum videtur
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
-
- Enthusiast
- Posts: 537
- Joined: Wed Oct 29, 2003 10:35 am
-
- Addict
- Posts: 4519
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: PureUnit -- automated testing framework for PureBasic
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:saved as 'test_PureUnit.pb' and then the following run in cmd from the directory containing the the test code:
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.
for example this code file:
Code: Select all
ProcedureUnit mytest()
OpenConsole("title")
PrintN("bla")
Assert(1 = 1, "fine")
EndProcedureUnit
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
ps:
the same result if i open PureUnitGui.exe directly from the explorer and choose the file.