Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
faq_dynamic_change_of_browser [2020/05/10 16:20] admin removed |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Testing AUT with Different Browsers ===== | ||
- | |||
- | The type of browser to be used to run your model is defined in the [[ModelNode|model node]] property. If you run the model with multiple virtual users, all virtual users will be started with the same browser selected for the model. | ||
- | |||
- | What if you want to have a bunch virtual users running Firefox and the others running IE with a single model execution? | ||
- | |||
- | There are several ways to dynamically change the browser type. | ||
- | |||
- | You can dynamically change the type of browser for each of the virtual user thread by calling mScript method $setBrowserCmd(' | ||
- | |||
- | This is typically done by placing // | ||
- | |||
- | However this is still hardcoded to a specific browser. To start AUT using different browser for different virtual user, you can use random number generation function // | ||
- | |||
- | <action code=" | ||
- | <if value1=" | ||
- | < | ||
- | </if> | ||
- | |||
- | A better alternative is to store a list of browser cmd in a dataset and use $nextDataSetRow(' | ||
- | |||
- | < | ||
- | < | ||
- | |||
- | Here we assume you have created a dataset called // | ||
- | |||
- | You can use the later approach to change the proportion of the virtual users to run each type of the browser by adding more rows of one browser than the other. | ||
- | |||
- | Another alternative is to use // | ||
- | < | ||
- | |||
- | |||
- | All of the above methods are all viable option. | ||