Querying MongoDB with Groovy
The simplicity and scalability of document-based or NoSQL databases has made them very popular. One of the most popular NoSQL databases is MongoDB (http://www.mongodb.org/). In this recipe, we learn how to query MongoDB by calling its API using a Groovy TestStep
.
Tip
MongoDB as a service backend
Since MongoDB stores data as documents using the (Binary JSON) or BSON format, it can be convenient for use as a service or a mock backend when JSON data is required.
Getting ready
If you don't already have MongoDB, then install it using the instructions on the main MongoDB site (http://docs.mongodb.org/manual/installation/). I am assuming that MongoDb will be running on the usual localhost
and port 27017
. By default, no authentication ...
Get SoapUI Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.