Forum Discussion
6 Replies
- tristaanogreEsteemed Contributor
There's nothing natively built in to TestComplete to do that, no. You'll have to build a method to add rows to a CSV or Spreadsheet after executing your checkpoints.
- clayContributor
That does not surprise me. Where can I look to find resources to develop such a method? Is there an API for TestComplete that I missed in the documentation somewhere?
Thanks.
- tristaanogreEsteemed Contributor
You're probably looking for this:
https://support.smartbear.com/testcomplete/docs/reference/project-objects/project/project/logs.htmlHowever, what I was suggesting was something a bit more real-time than that. That method requires that you auto-save your logs every so many minutes during a test run and then run the method that you right at the very end of the test run. You then need to parse through the log items to find what you're looking for and then dump them out.
Instead, what I would suggest is build a wrapper around your checkpoints that you use when you create your checkpoint code. It might look something like the following pseudocode.
function checkpointCustom() { //execute the checkpoint if (checkpoint == passed) { writetofile('check point passed') } else { writetofile('checkpoint failed') } }
That way you have control over the write out to the file right away without needing to parse through the log objects to find the specific information you want.