### Example JDBC Configuration File Path Source: https://genrocket.freshdesk.com/support/solutions/articles/19000059326-using-genrocket-xts-extract-table-schema This is an example of a path to a JDBC properties file used by GenRocket XTS. ```generic /home/jdoe/config/config.properties ``` -------------------------------- ### Example MongoDB Connection Properties Source: https://genrocket.freshdesk.com/support/solutions/articles/19000111316-how-do-i-use-the-mongoeachtomapgen-and-mongoeachfrommapgen-generators- An example of a config.properties file demonstrating how to connect to a local MongoDB instance with read/write access. ```XML host=localhost port=27017 user=root password=some123! database=bank ``` -------------------------------- ### Example Scenario Execution Source: https://genrocket.freshdesk.com/support/solutions/articles/19000114877-how-to-generate-flat-avro-file-format An example command to run a specific GenRocket scenario file named 'UserScenario.grs'. ```bash genrocket -r UserScenario.grs ``` -------------------------------- ### Example GenRocket Command with Override Source: https://genrocket.freshdesk.com/support/solutions/articles/19000079461--override-resources This example demonstrates how to use the '-or' option with a specific scenario and resource file. ```bash genrocket -r -or ``` -------------------------------- ### Example of Running a Specific Scenario Chain Source: https://genrocket.freshdesk.com/support/solutions/articles/19000115289-how-do-i-run-a-scenario-chain- This is a concrete example of the command used to run a Scenario Chain named 'SampleScenarioChain'. ```bash genrocket -r SampleScenarioChain.grs ``` -------------------------------- ### Example Scenario Chain Execution Source: https://genrocket.freshdesk.com/support/solutions/articles/19000114878-how-to-generate-nested-avro-file-format An example of the command to run a specific scenario chain named 'Avro1ScenarioChain.grs'. ```bash genrocket -r Avro1ScenarioChain.grs ``` -------------------------------- ### Example MongoDB URI Connection String Source: https://genrocket.freshdesk.com/support/solutions/articles/19000111316-how-do-i-use-the-mongoeachtomapgen-and-mongoeachfrommapgen-generators- An example config.properties file demonstrating the use of the 'url' property for connecting to a MongoDB database. ```HTML url=mongodb://user:password@localhost:27017/admin ``` -------------------------------- ### UserSegment XML Example Source: https://genrocket.freshdesk.com/support/solutions/articles/19000109128-how-do-i-use-the-delimitedfilesegmentmergereceiver- An example of the UserSegment XML structure, showing how user data is represented with attributes. ```xml ``` -------------------------------- ### Example Scenario Chain Execution Source: https://genrocket.freshdesk.com/support/solutions/articles/19000000113-what-is-a-scenario-chain- An example of running a specific Scenario Chain named 'AllScenarioChain.grs' to generate test data. ```Generic genrocket -r AllScenarioChain.grs ``` -------------------------------- ### API Example - Minimum Scenario Source: https://genrocket.freshdesk.com/support/solutions/folders/19000150235 A Groovy example demonstrating how to use the GenRocket API to build a minimum Scenario from scratch and output one row to an XML file. ```APIDOC ## API Example - Minimum Scenario ### Description This is a Groovy example that shows how to use the GenRocket API to build an absolute minimum Scenario from scratch and output one row to an XML file. ### Language Groovy ### Output Format XML ``` -------------------------------- ### Payload OK Response Example Source: https://genrocket.freshdesk.com/support/solutions/articles/19000098512-change-username This is an example of a successful response after changing a username. It includes user details and a success flag. ```json { "errors": { }, "fields": { "externalId": "XXXXXX-7001-4c4f-b5c8-XXXXXXXXXXX", "firstName": "Test", "lastName": "XYZ", "username": "abc@email.com", "enabled": true, "roles": [ "ROLE_USER" ] }, "success": true } ``` -------------------------------- ### JSON Template File Example Source: https://genrocket.freshdesk.com/support/solutions/articles/19000099202-how-do-i-use-generictemplatefilereceiver This is an example of a JSON template file. Tags enclosed in '@' symbols represent GenRocket Domain Attributes that will be replaced with generated data. ```json [ { "id" : "@User.id@", "firstName" : "@firstName@", "lastName" : "Abell", "middleInitial" : "D", "username" : "@username@", "password" : "@password@" } ] ``` -------------------------------- ### XML Template File Example Source: https://genrocket.freshdesk.com/support/solutions/articles/19000099202-how-do-i-use-generictemplatefilereceiver This is an example of an XML template file. Tags enclosed in '@' symbols represent GenRocket Domain Attributes that will be replaced with generated data. ```xml ``` -------------------------------- ### XML Template File Example Source: https://genrocket.freshdesk.com/support/solutions/articles/19000041622-how-do-i-use-the-xmltemplatereceiver- An example template file containing the 'item' element and placeholders for generated test data. This file is processed by the XMLTemplateReceiver. ```XML Acme Co
123 Road Runner Dr
Tuson USA
@Item.itemId@ @productId@ Handle with care @quantity@ @price@ Acme Co
123 Road Runner Dr
Tuson USA
``` -------------------------------- ### RangeGen Generator Example for Dates Source: https://genrocket.freshdesk.com/support/solutions/articles/19000107283-how-do-i-use-the-parquetfilereceiver- Generates a range of numbers starting at 1, incrementing by 3 for each record, to be added as days to the Unix epoch date (01-01-1970). ```text RangeGen Generator Example The Generator will generate a range of numbers in ascending order starting at 1. The value will jump by 3 for each record. In this example, the date will be changed as shown below for each record: * Record 1 - 1 day from epoch (01-02-1970) * Record 2 - 4 days from epoch (01-05-1970) * Record 3 - 7 days from epoch (01-08-1970) * Record 4 - 10 days from epoch (01-11-1970) * ..... ``` -------------------------------- ### RangeGen Generator Example for Timestamps Source: https://genrocket.freshdesk.com/support/solutions/articles/19000107283-how-do-i-use-the-parquetfilereceiver- Generates a range of numbers starting at 1, incrementing by 500 for each record, to increase the milliseconds of the Unix epoch date (01-01-1970) for timestamp generation. ```text RangeGen Generator Example The Generator will generate a range of numbers in ascending order starting at 1. The value will jump by 500 for each record. In this example, the timestamp will be changed as shown below for each record: * Record 1 - 1970-01-01 00:00:00.001 * Record 2 - 1970-01-01 00:00:00.501 * Record 3 - 1970-01-01 00:00:01.001 * Record 4 - 1970-01-01 00:00:01.501 * ... ``` -------------------------------- ### Example JDBC Configuration File Source: https://genrocket.freshdesk.com/support/solutions/articles/19000059326-using-genrocket-xts-extract-table-schema This is an example JDBC configuration file for connecting to a MySQL database. Ensure all four parameters (driver, user, password, url) are present. ```properties driver=com.mysql.jdbc.Driver user=root password=admin url=jdbc:mysql://localhost:3306/acme ``` -------------------------------- ### Example JDBC Configuration File Source: https://genrocket.freshdesk.com/support/solutions/articles/19000114171-banking-demo This is an example of a JDBC configuration file for connecting to a MySQL database named 'bank_demo'. Ensure the password is changed to your actual MySQL password. ```properties driver=com.mysql.jdbc.Driver user=root password=MySQL password url=jdbc:mysql://localhost:3306/bank_demo?useServerPrepStmts=false&rewriteBatchedStatements=true batchCount=1000 ``` -------------------------------- ### Request URL for Receiver Categories Source: https://genrocket.freshdesk.com/support/solutions/articles/19000040356-ws-receivers-categories This is the URL to access the GenRocket Receiver Categories API. No specific setup or imports are required beyond making an HTTP GET request to this endpoint. ```HTTP https://app.genrocket.com/ws/receivers/categories ``` -------------------------------- ### Sample Resource Properties File Source: https://genrocket.freshdesk.com/support/solutions/articles/19000079461--override-resources Define custom resource paths for output and database configurations in this properties file. ```properties resource.output.directory=/home/janedoe/Desktop resource.jdbc.directory=/home/janedoe/dbConfig ``` -------------------------------- ### Groovy API Example - Minimum Scenario Source: https://genrocket.freshdesk.com/support/solutions/folders/19000150235 This Groovy example demonstrates building a minimal scenario from scratch using the GenRocket API and outputting one row to an XML file. ```Groovy import com.genrocket.api.GenRocket // Create a GenRocket instance GenRocket gr = new GenRocket() // Create a new Scenario Scenario scenario = gr.createScenario("MyMinimumScenario") // Add a table to the Scenario Table table = scenario.addTable("User") // Add an attribute to the table Attribute attribute = table.addAttribute("UserID") attribute.setDataType("NUMERIC") // Set the number of rows to generate scenario.setNumberOfRows(1) // Set the output format to XML session.set andOutputFormat("XML") // Run the scenario session.run() println "Scenario created and run successfully." ``` -------------------------------- ### CalcGen Variable Examples Source: https://genrocket.freshdesk.com/support/solutions/articles/19000059549-how-do-i-use-the-calcgen-generator- Examples of how variables can be defined for the CalcGen Generator, either as constant values or references to other attributes. ```plaintext 3 ``` ```plaintext #{test.value1} ``` -------------------------------- ### API Example - Modifying Scenario Conditions Source: https://genrocket.freshdesk.com/support/solutions/folders/19000150235 An example showing how to modify the conditions of a Scenario using the GenRocket API before running it. ```APIDOC ## API Example - Modifying Scenario Conditions ### Description This is an example of how the conditions of a Scenario can be modified, using the GenRocket API, prior to running the Scenario. ### Use Case Modifying Scenario conditions before execution. ``` -------------------------------- ### Sample Receiver Configuration Source: https://genrocket.freshdesk.com/support/solutions/articles/19000046148-how-do-i-use-the-realtimetestreceiver- A sample configuration file demonstrating the use of requestURL, constant, timestamp, and UUID header types. ```string https://someurl/#{firstName}
true
``` -------------------------------- ### MongoDB Connection Properties Example Source: https://genrocket.freshdesk.com/support/solutions/articles/19000111314-how-do-i-use-the-mongotomapgen-and-mongofrommapgen-generators- This example shows the required properties for connecting to a MongoDB database using a properties file. Ensure these properties are correctly configured for database access. ```properties host=localhost port=27107 user=root password=some123! database=bank ``` -------------------------------- ### Sample Kafka Producer Configuration Source: https://genrocket.freshdesk.com/support/solutions/articles/19000115166-how-do-i-use-the-kafkainsertreceiver- This configuration is used for setting up the Kafka producer connection. Ensure 'bootstrap.servers' points to your Kafka broker. ```properties bootstrap.servers=localhost:9092 acks=all retries=0 buffer.memory=33554432 key.serializer=org.apache.kafka.common.serialization.StringSerializer value.serializer=org.apache.kafka.common.serialization.StringSerializer ``` -------------------------------- ### XML Configuration File Example Source: https://genrocket.freshdesk.com/support/solutions/articles/19000041622-how-do-i-use-the-xmltemplatereceiver- Defines the element to replicate and the tags used as placeholders for generated data. Ensure GenRocket Domains have matching attributes for these tags. ```XML ``` -------------------------------- ### Retrieve Receiver Description Source: https://genrocket.freshdesk.com/support/solutions/articles/19000040358-ws-receivers-receiver-fullname- Use this URL to get the description of a specific receiver by providing its full name. This is a GET request. ```HTTP https://app.genrocket.com/ws/receivers/receiver/${fullName} ``` -------------------------------- ### Get Receiver Categories Source: https://genrocket.freshdesk.com/support/solutions/articles/19000040356-ws-receivers-categories Retrieves a list of all GenRocket Receiver Categories in ascending order. This is a GET request to the specified URL. ```APIDOC ## GET /ws/receivers/categories ### Description Returns the list of all GenRocket Receiver Categories in ascending order. ### Method GET ### Endpoint https://app.genrocket.com/ws/receivers/categories ### Response #### Success Response (200) - **categories** (array) - A list of receiver category objects. - **name** (string) - The name of the receiver category. ### Response Example ```json { "categories":[ { "name":"Common Receivers" }, { "name":"In Memory Receivers" }, { "name":"MySQL Receivers" } ] } ``` ``` -------------------------------- ### API Example - Generate 10,000 Users Source: https://genrocket.freshdesk.com/support/solutions/folders/19000150235 A Groovy code example demonstrating the use of the GenRocket API to build a scenario that generates 10,000 users and outputs to an XML file. ```APIDOC ## API Example - Generate 10,000 Users ### Description This is a Groovy code example that shows how to use the GenRocket API to build a scenario from scratch to generate 10,000 Users and output to an XML file. ### Language Groovy ### Output Format XML ``` -------------------------------- ### Add New User OK Response Source: https://genrocket.freshdesk.com/support/solutions/articles/19000098509-web-services-add-new-user This is an example of a successful response from the 'Add New User' web service. It confirms the user creation and returns their details. ```json { "errors": { }, "fields": { "externalId": "xxxxxxxxx-7001-4c4f-b5c8-xxxxxxxxxxxx", "firstName": "ABC", "lastName": "XYZ", "username": "email@email.com", "enabled": true, "roles": [ "ROLE_USER" ] }, "success": true } ```