- Receiver Parameters
- Receiver's Attribute Property Keys
- Use Case 1: Generate Different Colored Images with Full Name
Receiver's Attribute Property Keys
Use Case 1: Generate Different Colored Images with Full Name
A tester wants to generate 100 GIF images containing full names. Generated images will be 300 x 300 and have different background colors. Additionally, the font type will vary in each generated image.
Initial Project Setup
A Project has been created with one Project Version, which contains the following:
- A User Domain with the loopCount set to 100.
- The ImageReceiver has been assigned to the User Domain
- A Scenario has been added to the User Domain.
|fullName||Generates a full name as the text for each image.||FullNameGen|
|backgroundColor||Determines image background color (yellow, cyan, green, and gray).||ListGen|
|width||Sets the width of each generated image to 300.||ConstantGen|
|height||Sets the height of each generated image to 300.||ConstantGen|
|font||Determines font type for each generated image (Arial, Verdana, Comic Sans MS, and Courier New).||ListGen|
|fontSize||Sets the font size to 16 for each image.||ConstantGen|
The fileNamePrefix Parameter has a value of "image." Remember to click the Save button after making any changes to Receiver Parameters.
id Attribute Property Keys
The id Attribute will be used as the file name suffix for each generated JPEG image. Select the id Attribute and change the fileIndex property key value to "True."
Since the fileNamePrefix Parameter was set to "image" for the ImageReceiver, each file will contain the word "image" combined with the "id Attribute value." Example: image1.gif.
fullName Attribute Property Keys
The fullName Attribute will be used for the text in each generated image. Select the fullName Attribute and change the text property key to "True."
backgroundColor Attribute Property Keys
The backgroundColor Attribute changes the background color between yellow, cyan, green, and gray. Select the backgroundColor Attribute and change the backgroundColor property key to "True."
width Attribute Property Keys
The width Attribute sets the image width to "300." Select the width Attribute and change the width property key to "True."
height Attribute Property Keys
The height Attribute sets the image height to "300." Select the height Attribute and change the height property key to "True."
font Attribute Property Keys
The font Attribute sets the font type to Arial, Verdana, Comic Sans MS, or Courier New. Select the font Attribute and change the fontType property key to "True."
fontSize Attribute Property Keys
The fontSize Attribute sets the font size of the text to "16." Select the fontSize Attribute and change the fontSize property key to "True."
Download and Run the Scenario
Download the Scenario by clicking the Cloud icon in the Project Dashboard or the Domain Dashboard.
Open a Command Prompt or Terminal window and run the following command at the command line to generate the images.
genrocket - r <ScenarioName.grs>
Replace <ScenarioName.grs> in the command line with the actual name of the Scenario.
genrocket -r UserScenario.grs
100 GIF Images files have been generated in this example. Each image has a different background color and text. The text type varies per generated image, and the text size is "16.".
Sample Image 1
Sample Image 2
Sample Image 3
Sample Image 4