Add to Technorati Favorites

Categories

New Commands added to QAuto for Regression Testing

Based on user feedback, 5 new commands are added to QAuto:
CopyFile(param1,param2)
BackupFile(param1)
RestoreFile(param1)
DeleteFile(param1)
Comment(whatever string)

For regression testing, you need to be stateless - that is if you add new input files, the test running for other tests may be affected.

So, these above functions will be useful.

When you record a new test (say ABCD), then a folder called _AuxFiles_ABCD is automatically created in the same level as the test ABCD (where you store the QAuto test cases).

If you put a file called MyFile in this folder (_AuxFiles_ABCD) and you manually add a line CopyFile(MyFile,C:\Somewhere\blah\MyFile) in the script window - then, when this line is executed the file will be copied to the C:\Somewhere\blah\MyFile. Remember no spaces around the comma or after or before the brackets.

QAuto will automatically make a backup of existing file C:\Somewhere\blah\MyFile before overwriting.
Also, QAuto will automatically restore this backup when the script is complete. If there was no existing file there (at the time of copy), then it will delete this file.

BackupFile(C:\Somewhere\blah\MyFile) will create a backup of this file. And when the test run is complete, it will restore automatically from this file. This helps when your test cases modify existing files and you want to restore them.

RestoreFile(C:\Somewhere\blah\MyFile) - is the explicit restore command. You can use it in conjunction with CopyFile and BackupFile - but it is not really necessary. QAuto does this automatically.

DeleteFile(C:\Somewhere\blah\MyFile) - will delete this file. It is useful if your test cases create new files and you want to restore system back to original state for the next test.

Comment(my comment blah blah) - will add this comment in the results. It is useful if you want to add own comment or say where the snapshot is stored, etc.

1 comment to New Commands added to QAuto for Regression Testing

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>