Forum Discussion

b_cross's avatar
b_cross
Occasional Contributor
11 years ago
Solved

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 se...
  • Ryan_Moran's avatar
    11 years ago
    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...

    */

    }