Links

Meck: mocking library for Erlang

With meck you can easily mock modules in Erlang. You can also perform some basic validations on the mocked modules, such as making sure no unexpected exceptions occurred or looking at the call history.


Features

* Automatic renaming and restoration of original modules
* Automatic backup and restore of cover data
* Changing return values using sequences and loops of static values
* Pass through: use functions from the original module
* Mock is linked to the creating process (disable with|nolink|)
* Complete call history showing calls, results and exceptions
* Mocking of sticky modules (using the option|unstick|)
* Throwing of expected exceptions that keeps the module valid

https://github.com/eproxus/meck/

Filed under  //   erlang   github   mock   opensource   testing  
Posted July 26, 2011 by email 

Thread Weaver: framework for writing multi-threaded unit tests in Java

Thread Weaver is a framework for writing multi-threaded unit tests in Java.

It provides mechanisms for creating breakpoints within your code, and for halting execution of a thread when a breakpoint is reached. Other threads can then run while the first thread is blocked. This allows you to write repeatable tests for that can check for race conditions and thread safety.

See the "Wiki" tab for a Users' Guide. For full documentation, please see the "docs" directory on the source tree, or in the main zip file on the Downloads page. The source tree also contains several examples of common race conditions, and shows how to test these using Thread Weaver.

http://code.google.com/p/thread-weaver/

Users Guide
http://code.google.com/p/thread-weaver/wiki/UsersGuide

Filed under  //   java   testing   threads  
Posted October 14, 2009 by email