Contributions
- 1.2KViews0likes0Comments
Re: Pass many paramaters to a script function
Sorry, my explanation was very short and incomplete. I try it again :) We use a proprietary test ware management tool to write test cases (SQS TestCenter). These test cases are connected to keyword tests in TestComplete. To execute the test cases the test ware management tool calls the connected keyword tests. The defined test data is passed as test parameters of the keyword tests. In special cases we need to pass this data further on to script functions e.g. checking a table row with many columns. For each column exists a test parameter which has to be passed to the script function as a parameter. The script function itself generates an array out of the passed test parameters and calls a generic script function which iterates over the table and the passed array. Due the high parameter count, the effort to maintain and write the script functions is very high. Therefore we want to write a generic script function which is called by the Keyword Test which iterates over the test parameter of the Keyword Test - e.g.: function checkTableRow (KeywordTest) { var arrIdentifyRow = Array(KeywordTest.Parameters.Length) { for (var i = 0; i < KeywordTest.Parameters.Length; i++) { arrIdentifyRow(i) = KeywordTest(Paramters)(i); } ... } I have read this is not possible due access restrictions during runtime. Is this correct and is there any other possibility?1.2KViews0likes0CommentsPass many paramaters to a script function
We have to pass many test parameters from keyword tests to script functions. Unfortunately we cannot directly use script functions and we can't use keyword test variables. This is because of a dependency to another test tool. Is there any possibility to loop over the test parameters, build an array and pass this array to the script test? Or is there any possibility to loop over the test parameters in a script function?1.7KViews0likes4Comments