Contributions
Re: Comparing file from stores to output file locks both files sometimes
Nope, The lock is not done by my application, it's done by test complete .. the flow is like this : 1. Application runs the process. 2. Application saves to file successfully. 3. Test complete does the comparison succesfully. 4. Application runs the process again. 5. Application tries to save the file. 6. Boom .. file is locked. Stopping test complete's running won't unlock the file, the only way is to close test complete's process. the timing issue you mentioned above might help, I'll try to add some Delay() after the check is finished, and before the next file-generation starts. Thanks a lot Tristaanogre ..1.2KViews0likes0CommentsRe: Comparing file from stores to output file locks both files sometimes
Thanx for the reply, The main application closes the file well, I even tried to create that csv file using notepad++ and then use test complete to compare with it, sometimes the file gets locked and sometimes not. there's no much code, just a line of comparison : assuming the expected output is named stored_file. and assuming my target file which is produced by the external app is D:\thing\output_file.txt I use this line of code as a check point: Files.stored_file.check("D:\thing\output_file.txt"); shall I do some sort of file.close or something after the check command?1.2KViews0likes2CommentsComparing file from stores to output file locks both files sometimes
Hi, I have around 300 test cases for a desktop application, each has a saved expected result file in the Files stores. Each test case works as follows : Generates a data table. Export the data table to a file. Then : Files.stored_file.check("D:\thing\output_file.txt"); so the first time, the file gets exported and saved and compared succesfully, now if you re-run the test case ,, sometimes it works, and sometimes not! no specific steps to reproduce! Reason is that the output file gets locked, and won't get deleted/overwritten unless test complete is closed. if you reopen test complete it works very well. can you please help me with this? Thanks.1.2KViews0likes4Comments