Forum Discussion

tlalok's avatar
tlalok
Contributor
15 years ago

add fileversion of tested app in keyword test log

Hi,



after a long pause (version 3) i am re-evaluating TC7 now and so far I like the new keyword tests a lot. With version 3 I remember spending a lot of trial and error with the scripts.



No my question: For documentation purpose I would like to add the fileversion (from the file properties) of the tested app into the test log. Maybe this can be done with the "Code Snippet" action in the keyword test.



I could not find a faq for that. Maybe someone can put me in the right direction? I bet this has been asked before.



Thanks,



- Carsten

3 Replies

  • Hi,





    thanks to great documentation I could solve this one myself:





    * Call "Process" action with method "FileVersionInfo"

    * Log "LastResult" 





    Really easy, isn't it ;-) 





    Thanks,





    - Carsten
  • Hi Carsten,



    Yes, you need to run a code snippet from your KD test. To obtain the tested application's version, use either the aqFileInfo.VersionInfo property or the FileVersionInfo property of your application's process (see the "aqFileInfo.VersionInfo" and "FileVersionInfo Property" help topics).