Description

Using Mongo Query, the MongoToMapGen Generator will query data from one or more database collection columns into a memory buffer. The query is executed before the first row of test data is generated. The number of rows that may be queried has no limits. Only a subset of the queried rows is kept in memory, at any given time, based on the size of the memory buffer.

 

This Generator works in concert with the MongoFromMapGen Generator, which maps to a given column that is managed by a MongoToMapGen Generator to generate its data for a given Attribute. 

Note: For more information about the MongoFromMapGen Generator, please click here.

  

Parameters

The following parameters may be used to configure the MongoToMapGen Generator. Parameters with an asterisk (*) are required.

  • resourcePath* - Defines the path where the resource file for MongoDB connection properties exists.
  • resourceSubDir - Defines an optional subdirectory under the resourcePath where the resource file for MongoDB connection properties exists.
  • resourceName* - Defines the name of the resource that contains the database connection information on a user's local machine.
  • bufferSize* - Defines how many rows to keep in memory at a time. Note: Setting the number of rows to a very high number may cause an OutOfMemoryException to occur if the computer does not have enough available memory. The default buffer size is 1000 rows.
  • setLoop - setLoop provides the ability to OVERRIDE the loopCount, at the Scenario level, and to the number of rows that are queried. The default is set to False.
  • queryOnce* - When the Domain that defines the query has a Parent Domain, it becomes a Child Domain of the Parent Domain. This flag determines if the Child Domain's query should be executed each time the Child Domain is called from the Parent Domain or if the query should only be executed once, the first time the Parent Domain calls the Child Domain. The default is set True to query once.
  • grVar1 - The first of five possible variables that may be used within the query.
  • grVar2 - The second of five possible variables that may be used within the query.
  • grVar3 - The third of five possible variables that may be used within the query.
  • grVar4 - The fourth of five possible variables that may be used within the query.
  • grVar5 - The fifth of five possible variables that may be used within the query.
  • collectionName* - Defines the collection name present in MongoDB Database.
  • methodName* - Defines the method name in MongoDB Query.
  • query - Defines the MongoDB Query to run.
  • sort  - Defines the sort in MongoDB Query.
  • projection - Defines the projection for MongoDB Query.
  • list - Stores values into a list that is used for preview data only within the GenRocket web platform.