Shows how to setup a MongoDB Test false false 127.0.0.1 db false 50 0 0 120000 0 false 5 false false false 0 0 false Configures connection to MongoDB continue false -1 1 30 1367357168000 1367357168000 false 300 10 groovy insert1 import com.mongodb.DB; import org.apache.jmeter.protocol.mongodb.config.MongoDBHolder; import com.mongodb.WriteResult; import com.mongodb.BasicDBObject; import com.mongodb.DBCollection; import com.mongodb.WriteConcern; import com.mongodb.WriteResult; // Get DB com.mongodb.DB db = org.apache.jmeter.protocol.mongodb.config.MongoDBHolder.getDBFromSource("db", "test"); // Get collection to insert DBCollection coll = db.getCollection("testCollection"); BasicDBObject doc = new BasicDBObject("name", "MongoDB"). append("type", "database"). append("count", 1). append("info", new BasicDBObject("x", 203).append("y", 102)); // Insert object WriteResult wr = coll.insert(doc, WriteConcern.ACKNOWLEDGED); // Set response data SampleResult.setResponseData(""+wr.toString(),"UTF-8"); "err" : null Assertion.response_data false 2 groovy count1 import com.mongodb.DB; import org.apache.jmeter.protocol.mongodb.config.MongoDBHolder; import com.mongodb.BasicDBObject; import com.mongodb.DBObject; import com.mongodb.DBCollection; DB db = MongoDBHolder.getDBFromSource("db", "test"); DBCollection coll = db.getCollection("testCollection"); int size = coll.count(); SampleResult.setResponseData(""+size,"UTF-8"); \d+ Assertion.response_data false 1 false saveConfig true true true true true true false false true false false false false true false false true true 0 true true true true Remove for Load Test false saveConfig true true true true true true false false true false false false false true false false true true 0 true true true true Remove for Load Test