| || |
uses disk to store data and do the comparision
I was reading through previous post re:uses of disk to store data for comparision.I was wondering if someone could send me their script if they have already used to cater for above issue.
A way of loading the data you are testing against into memory by using arrays, variables at the very beginning of your test process.
Then doing your compares in memory as memory which is typically more than a 1,000 times fatser than accessing your hard disk.
Here is some pseudo code to illustrate what I mean
***Load dat entries to memory
Declare Array: ArrayTxtCompares
Get first compare element into array location1: File read C:\directoryWhereDataIs\datafile1
Put into ArrayTxtCompares
Repeat above till all data required to compare against filled e.g. Put into ArrayTxtCompare....n
Then as the the test is run e.g.
1) Click button
2) Get result and write to variable; valueToTest
3)Compare valueToTest==ArrayTxtCompare if equal mark as passed
If not mark as failed.
You can then write your results at the end.
Re: uses disk to store data and do the comparision
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Open sFile for Input as #hFile
Do While Not Eof(hFile)
Line Input #hFile, FileLineData
Close #hFile</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">^^ this should get you started at least. Look up in the VB help for Line Input. It will do what you want I believe.