PDA

View Full Version : Extending QTest for custom logging to TeamCity



bothapn
23rd May 2011, 10:48
Hi,

I would like to extend the QTestLib logging facility (I see QPlainTestLogger inherits from QAbstractLogger). I would like to tell QTest to use my (soon to be written) custom TestLogger (which will format output accordingly for Teamcity unit testing).

I would prefer a clean way in contrast to hacking QTestLib and making it work.

Can anyone give me a direction as the "easily extendable" item on QTestLib manual is not helping very much.

Thanks allot,

Pieter

bothapn
25th May 2011, 11:23
bump......

adass
25th May 2011, 12:44
Even I'm looking for the similar option of extending the QTestLib but don't see any information pertaining to "easily extendabe" in the manual.

MarekR22
25th May 2011, 15:54
I don't know what exact format of logs do you expect but note that you can have xml output (use proper switch for test application).
If this doesn't solve your problem you have two choices:
a. write pipe application which will parse xml output to required format.
b. correct QTestLib yourself (this is just developers tool so you don't have to worry about binary compatibility).

bothapn
27th May 2011, 08:17
Hi,

I decided to work around the problem. I went with GoogleTest and thus avoided the whole hacking and backporting changes for QTestLib. GoogleTest also integrates nicely with TeamCity currently.

Pieter