martes, agosto 07, 2012

NoSQLUnit 0.3.2 Released

Yo no te pido la luna, tan solo quiero amarte. Quiero ser esa locura que vibra muy dentro de tí (Yo No Te Pido La Luna - Sergio Dalma)

Update: 0.3.3 version has been released providing In-Memory Neo4j lifecycle support.

NoSQLUnit is a JUnit extension to make writing unit and integration tests of systems that use NoSQL backend easier. Visit official page for more information.

In 0.3.2 release, one new NoSQL system is supported and is Neo4j.

Neo4j is a high-performance, NoSQL graph database with all the features of a mature and robust database.

As all databases supported by NoSQLUnit, two set of rules are provided to write Neo4j tests:

First set of JUnit Rules are those responsible of managing database lifecycle; basically starting and stopping Neo4j.
  • Embedded: com.lordofthejars.nosqlunit.neo4j.EmbeddedNeo4j
  • Managed Wrapping: com.lordofthejars.nosqlunit.neo4j.ManagedWrappingNeoServer
  • Managed: com.lordofthejars.nosqlunit.neo4j.ManagedNeoServer
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.

4 comentarios:

Michael Hunger dijo...

Hi Alex,

thanks so much for integrating Neo4j, thats really awesome.

Just wanted to point out one thing. Neo4j has a in-memory version of the database which works exactly as the real one.

Please see this chapter of the docs for dependency and usage:



Alex Soto dijo...

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.

chenlina dijo...

coach outlet
adidas outlet
jordan 6
tory burch outlet
tiffany outlet
oakley outlet
replica watches
nike trainers
polo ralph lauren
christian louboutin outlet
kate spade handbags
insanity workout
air jordans
coach outlet
replica watches
longchamp bags
michael kors outlet online sale
michael kors handbags
coach outlet
coach factory outlet
polo ralph kids
coach outlet store online
nike roshe run women
ray ban outlet
nike air max 90
louis vuitton outlet
fitflop sandals
ray ban sunglasses outlet
toms shoes
adidas superstars
kobe 10
michael kors outlet store
rolex submariner
air jordans
nike trainers uk
nike uk
cheap jordan shoes
nike roshe flyknit
replica watches
replica watches

Gege Dai dijo...

oakley sunglasses
cartier sunglasses
police sunglasses
beats headphones
fred perry polo shirts
tods outlet online
michael kors handbags
jordan 11
michael kors uk
ralph lauren polo
coach outlet online
ralph lauren polo
tiffany and co
oakley sunglasses wholesale
tory burch outlet
polo ralph lauren
tory burch outlet
mlb jerseys
cartier watches
michael kors outlet
tiffany outlet
tory burch shoes
oakley sunglasses wholesale
michael kors outlet store
marc jacobs sale
nike roshe run
prada sunglasses for women
longchamp pliage
true religion sale
nike air max 90
ed hardy clothing
polo ralph lauren
ferragamo shoes
longchamp outlet online
michael kors outlet online

Donate If You Can and Find Post Useful