We are using data driven architecture for our automated project. Our AUT is written in VB6, which makes TestPartner the ideal choice for scripting. TP was used to create procedures for each button within the AUT so that specific processing can be done on the different forms that appear based on the button selection.
Test input and expected output is located in a .csv data file. Each record(row) in the data file calls a specific procedure to perform an action of specific steps within the app. As the tool navigates our app, values (labels and calculated values) are captured and compared to an expected output. (located in the .csv file as described above)
When a Pass/Fail is determined, it is written to an output file(.txt) This seems to work okay, however the playing of the scripts runs slower than desired. I've believe that writing to my user defined output files is what slows the process.
Is there anything that can be adjusted to improve performance without losing the ability to report to external files?
This is a generic reply. When ever you write a data driven approach that uses the disk to store data that you use to compare, you should find 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 (RAM) 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. Remembering that if the computer crashes you would lose the results so far.
Something like that.