Hey,
I need to compare an response from an GET rest API (JSON) to data in mongodb.
I connected my mongodb with groovy in my soapui:
import com.gmongo.GMongo
import com.mongodb.MongoClient
import com.mongodb.MongoCredential as MC
import com.mongodb.ServerAddress
def mongoClient = new MongoClient( new ServerAddress('MyDataBase:27017') )
def mongo = new GMongo( mongoClient )
def db = mongo.getDB('PADOC')
// attr uit GET halen
def response = context.expand( '${GET 1 Project#Response#$.PROJECT.UUID}' )
//Request weghalen
db.V1Project.findOne('content.PROJECT.UUID': response)
So I see the outcome in the log but how can I compare it with my response?
Many thanks in advance