Using Workmixes in Eggplant Performance Studio
When you construct a performance test in Eggplant Performance Studio, you might create the test from a single workflow or you might have something that includes multiple workflows and scripts. A workmix lets you set the relative proportion of each part within the overall test.
For example, you might have a test that includes three workflows and that will run with 100 virtual users (VUs). If you set the first workflow to 20% in a workmix, that workflow would use 20 VUs at runtime. You would still have 80% to divide between the other two workflows.
The workmix lets you provide appropriate weight for each segment of your test.
Step by Step: Creating a Workmix
Follow these steps to define a new workmix to use for your performance testing.
-
In the Studio Project tree, right-click the Workmixes folder, then select New workmix to open the Create Workmix dialog box.
-
Enter a name for the workmix in the Name field.
-
(Optional) Enter a description of this workmix in the Description field.
-
Add the workflows and scripts that you want to include in the workmix from the left column into the right column. All the scripts and workflows you have defined in the project are shown in the Available workflows/scripts column. You can add them to the Selected workflow/scripts column on the right by selecting an item, then clicking the right arrow in the center. You can also drag items from the left column to the right. Note that you can also select multiple items in the left column to move at once.
-
Set the percentage for each item in the right column. Initially, the percentages will be balanced. Change the value in the field beside an item by entering a new number in the field or by clicking the up or down arrows.
ImportantImportant: The total value of all items must equal 100% or you won't be able to save the workmix. As you make adjustments, the Total value field at the lower-left updates and turns red to show when your values don't add up to 100%.
-
When you're satisfied with the definition of the workmix, click OK.
The new workmix is added to the Project tree under Workmixes.
Creating a Test from a Workmix
After you create a workmix, you can use it to create a test. To do so, right-click the workmix in the Project tree, then select Create test. You can also select the workmix, then click the Create test button in the context-sensitive section of the Studio toolbar.
On the Create test from workmix dialog box, enter a name for the test (or accept the suggested name), enter a description (optional), and set the number of VUs, then click OK. The new test is added to the Tests folder in the Project tree.
When you create a test with this method, the test contains a separate VU group for each workflow or script in the workmix. The total number of VUs you set in the dialog box is split among the VU groups according to the percentages in the workmix.
Modifying Workmixes
To modify an existing workmix, select it in the Project tree under the Workmixes folder. The workmix displays in the Viewer pane of the Studio window.
Your options are essentially the same here as in the Create Workmix dialog box. You can add items to the workmix by moving them from the left column to the right. You can remove items from the workmix by selecting an item in the right column, then clicking the left arrow between the columns. You can adjust the percentage values for any item in the workmix. Remember if you're changing values that the total must equal 100% before you can save and leave the screen.
To change the name of a workmix, right-click it in the Project tree, then select Rename workmix. You can also select the item in the tree, then click the Rename workmix button in the context-sensitive section of the Studio toolbar. Enter a new name on the Rename workmix dialog box, then click OK.
To delete a workmix, right-click it in the Project tree, then select Delete workmix. You can also select the item in the tree, then click the Delete workmix button in the context-sensitive section of the Studio toolbar. You will be asked to confirm your choice to delete the workmix.