Troubleshooting

Solutions to common problems.

How to Troubleshoot

In ideal world, everything works, but in real world we face all sort of problem, such as connectivity to databases, various timeouts, permission problems, typos in configurations to name just a few.

At such circumstances, CAT may fail at any phase - reading and parsing project file, load list of data sources and tests, execute first or second or both queries in a test, generate output…

Because it is challenging to always comprehensively describe the exact point in the process and its cause in a short message, CAT has logging turned ON by default.

CAT logs are the first place where you should go when something does not work as you expect and you don’t know why.

Log Files in Your Project’s Directory

Whenever you open a CAT project file, CAT logs various information into the Log directory next to you project file. If such directory does not exist, it creates it. Logging is turned on by default and is set to Information level. Logging can be turned off, set to different level or to different file if you don’t like the default behavior.

We recommend to keep logging turned on, because once something goes wrong, it is much more easier to find out why.

Please note the Logs directory next to your project file. It appears when you first open or run the project file:

CAT Logs directory

Just sort the files accoring to Date modified descending, usually you need the last one:

CAT log file

What is important is that you will not only see the error message, but also the context. Was the file even open? Did CAT read list of data sources and tests? Did it start any? What exactly failed?

See CAT PowerShell module documentation for more information about how to set logging to different level and other options.

Log Files in Your Documents Directory

You can find some CAT logs also in your Documents directory:

CAT logs in Documents directory

Why is that? Why not to log always next to a project file? Well, again, in ideal world, CAT opens the project file and runs it. But you might have problems with permissions and CAT does not see the file for example. Or it does not exist. Or you have a typo in the file path. Or the path is completely wrong (especially tuning the path in automation processes is sometimes pain in neck). Or meteor shower just hit the hard drive. Having such problems not logged would make troubleshooting much harder. So whenever CAT does not yet know the context (with what project file you work), it logs to Documents/Logs directory.

Just remember, that in automation processes runs CAT under different account, so it might not be that obvious where exactly the logs are. PowerShell comes here to the rescue, e.g., this script outputs the content of the latest log file:

type (ls "$([Environment]::GetFolderPath('Personal'))/CAT/Logs" | Sort LastWriteTime -Desc | Select -First 1).FullName

See CAT PowerShell module documentation for more information about how to set logging to different level and other options.