b_cross
11 years agoOccasional Contributor
Set number of iterations from a user form
Hi
I have set up a user form that allows me to set some optinal test conditions from this form id also like to change the number of time a test case will run.
i can find the current set value using: Project.TestItems.TestItem(0).TestItem(0).Count()
but i don't see how i can up date this value from a combo box on a user form
Any help would be welcome
I have set up a user form that allows me to set some optinal test conditions from this form id also like to change the number of time a test case will run.
i can find the current set value using: Project.TestItems.TestItem(0).TestItem(0).Count()
but i don't see how i can up date this value from a combo box on a user form
Any help would be welcome
- I don't believe the count property can be modified during run time. You can however just call your main function of your script based on the number of iterations in your combo box.
function main(){
UserForms.MyForm1.ShowModal();
}
function readmycombobox(r){
/*
1. Create a button (TcxButton)
2. Create a procedure with Project.TestItems.TestItem(0).TestItem(0).Count()
3. Call the procedure from the buttons OnClick event
4. Include a read of the combobox in the procedure with UserForms.FormName.cxComboBox1.Text
*/
var tmp = UserForms.MyForm1.cxComboBox1.Text;
for (var c = 0;c < tmp;c++){
drivetests();
}
}
function drivetests(){
/*
Testing script stuff here...
*/
}