Perhaps some of it could be automated. I can imagine that it has potential as a harness to an extent. But, would it make sense to automate unit tests with QTP? That seems to be a better question. There are other tools better suited. Any QTP implementation would most certainly have a consequence of increasing the unit testing tool count and therefore maintenance and cost overhead. If you have but one license, the demand to run unit tests may impact your own work - correct?
Thanks Jake. Licenses aren't too much of an issue - it is more to do with the perceived need.
Being more of a functional oriented tester, I wanted to get an idea of how other development areas may be using the tool to assist them. I can see that various components, created for functional testing may help to just automate the application to a specific state, but that's all.
One example of many (I'm sure) and assuming one could marry VBScript and Java easily:
Let us a say a unit is responsible for logging data and the calling unit can specify what gets logged and the frequency of logging.
In this case, QTP could be used as a driver and validator. QTP could call the unit and then do log file parsing for correct periodicity and content; in addition to applying other unit testing techniques such as path, branch coverage, et al.
I suppose it could also be used to check methods and properties. There is probably much more.
Fermin, it would be best to search the Unit Testing forum. I think you will find it to be a good resource. There are too many to list here.