sdruker
11 years agoContributor
How to use the Testcomplete log object
Hi,
I want to write a script to generate a customizied report from my test results or maybe to store the data from the log into database table.
For example , I want to know the test names , how much steps each test has, how many steps pass and how much fail , the error messages etc...
I read the article :
http://support.smartbear.com/viewarticle/55140/
but I'm still kind of lost...
there are a lot of logs, and it's not clear how to parse them
Does anyone already wrote something like that and can help by adding an examle?
Thanks!!
Sivan
I want to write a script to generate a customizied report from my test results or maybe to store the data from the log into database table.
For example , I want to know the test names , how much steps each test has, how many steps pass and how much fail , the error messages etc...
I read the article :
Scripting Access to the Test Log Contents
http://support.smartbear.com/viewarticle/55140/
but I'm still kind of lost...
there are a lot of logs, and it's not clear how to parse them
Does anyone already wrote something like that and can help by adding an examle?
Thanks!!
Sivan
- Have you read one of the articles linked on the Scripting Access page. The article I am refering to is "Exporting Test Results" http://support.smartbear.com/viewarticle/55128/ - this Artilce talks about two different methods of exporting the logs.
One is as unpacked storage and the other is multipart hypertext storage. The multipart storage option is viewable in most web browsers either natively or by using an add-on. I suggest reading this article.
Beyond that, you say you want to export basically the stats and possible problems to a database?
I think this can be done with error handling and scripts. - OnError - do this - maybe some try catch statements but that would be while the scripts/tests are running.
If you want to do it after a test or series of tests were run, then a situation of where you have a separate test or script read the log, parse the log to it's components, connect to your db server - write records, etc.
I think depending on the depth and scope that you want for your log database to have it will grow depending on how often your tests are run.