Reputation: 33
I want to use a text file containing the source code of the QTP script, and compile it (create the usr,cfg,usp etc files that get created when we manually "save" a script in QTP) by using the command line. Is there a way to do both?
Upvotes: 0
Views: 1826
Reputation: 4320
To get rid of the problem, I´d make sure that run results never are saved in the test´s directory, and apply SVN on the whole directory of a test, or to the whole "tests" subdirectory root.
This might result in quite some subdirectory structure, but it has a meaning (for QTP), and without run results, it´s not hundreds of files, or megabytes, so SVN can indeed chew on them quite well.
Alternatively, you could use QC to save your tests in a QC repo, and enable version control in it. Then, QC will handle the "bundling" of all files of a tests, and guarantee that only one user can modify a given test.
Point is, if you just put the script into SVN, and, when you need it, re-create the other files programmatically, you lose info like (not limited to):
which probably is unacceptable except for the simplest most trivial tests. So I recommend you drop the idea of just saving the script content.
Upvotes: 0
Reputation: 1243
All those extra files in QTP/UFT are for when you're doing "more" than just writing a script. It stores the test description, associated repositories, parameters, recovery scenarios, etc. If you're writing test logic in a text file, there's a good chance you're not using any of that extra stuff either.
Take any blank QTP/UFT test to create a "template" of a valid test. Then all you have to do is replace the 'Action1/script.mts' file with the contents of your text file.
If you want do to all of this from a command-line, you'll need to write a simple console-based application to do the heavy lifting for you.
Upvotes: 1