Silktest Question 10: How to append to List Of List Of String?

Try the following code in 4Test language:

[ ] LIST OF STRING lsOptions = {}
[ ] LIST OF LIST OF STRING llsOptions = {{}}
[ ] STRING sLine
[ ]
[ ] hFile = FileOpen("{sDataDir}Installation\{sDataFile}",FM_READ)
[-] while FileReadLine(hFile,sLine)
[ ] lsOptions = Split(sLine,",")
[ ] ListAppend(llsOptions, lsOptions)

4 comments:

Anonymous said...

hey split function is not working in silk test ,do you have an idea of any ohter function which performs same as split

Anonymous said...

Is their any way to input values at run time

Anonymous said...

oh, come on folks!
is it really hard to write your own "split" func?! :)

Anonymous said...

Why bother if someone else has already done the work? I don't particuarly care to rewrite split just to satisfy your inner geekiness.

SilkTest interview questions for QA Testers