Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
dynamicfielddomain [2020/05/04 03:48] admin removed |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Dynamic Field Domains Using MScript ===== | ||
- | |||
- | In // | ||
- | | ||
- | Age: 5, 10, 25, 45, 60 | ||
- | | ||
- | |||
- | There are times when you generate the test data set you may wish to randomly generate these values or write your own function to generate these values according to your own rule or convention. | ||
- | |||
- | ---- | ||
- | ==== Dynamic Data ==== | ||
- | |||
- | // | ||
- | |||
- | For example: | ||
- | Age: $rand(5), $rand(6, 16), $rand(17, 35), $rand(36, 60), $rand(61, 120) | ||
- | |||
- | The above example calls //$rand()// //MScript// function to generate a random number in the specified range when the test data set is generated. | ||
- | |||
- | ---- | ||
- | ==== Custom MScript ==== | ||
- | |||
- | You may write custom //MScript// functions and call them just like //MScript// function example above. First you must add your //MScript// implementation java class to the field //MSript Class// | ||
- | Age: $_ageByGroup(' | ||
- | |||
- | |||