Depending on kind of test you are implementing (unit test, integration test, deployment test, ...) you will require an embedded approach, managed approach or remote approach. Note that for now I have not implementated of a Neo4j in-memory database at this time (0.3.3 will do), but embedded strategy for unit tests will be the better one. As Neo4j developers will know, you can start remote Neo4j server by calling start/stop scripts (Managed way) or by using an embedded database wrapper by a server (Managed Wrapping way), both of them are supported by NoSQLUnit.

Second set of rules are those responsible of maintaining database into known state;

NoSQLUnit Management: com.lordofthejars.nosqlunit.neo4j.Neo4jRule

And finally default dataset file format in Neo4j is GraphML. GraphML is a comprehensive and easy-to-use file format for graphs.

We will use the example of finding Neo's friends as an example of how to write unit tests for systems that uses Neo4j databases as backend.

First of all dataset used to maintain Neo4j into known state:

and finally the test case:

Next release will support Cassandra. Stay in touch with the project and of course I am opened to any ideas that you think that could make NoSQLUnit better.

Hi thank you very much for reading my blog and also helping me to improve NoSQLUnit. I read Neo4j documentation and I read about embedded way, and ImpermanentGraphDatabase but I do not understand that was only in-memory, but can be used for unit testing. Thank again and this afternoon I will release 0.3.3 version with in-memory approach supported.Regards,Alex.