Coded UI Test trace file does not contain required test execution details
-
20 апреля 2012 г. 8:34
Hello,
I have 2 different Coded UI Test solutions that test different desktop application.
Trace logs are enabled as recomended here (setting EqtTraceLevel = 4 in QTAgent32.exe.config).
When I execute a test in first project - I get all requied trace information (like Successfull Playback - Mouse click and so on).
However, running a test in second project results in a very small *.trx to be generated that does not contains expected trace data (for example there are several mouse clicks performed but there is no "Successfull Playback - Mouse click".) Also no screenshots are made when UITestControl not found.
I also see in this trace file data from NHinbernate - so I think that it somehow overwrites the trace.
Trace has also a different structure:
the first one (correct one) has the following xml nodes: UnitTestResult -> Output -> DebugTrace
the second one (invalid one) has the following xml nodes: UnitTestResult -> Output -> StdOut
It does not have "DebugTrace" xml node at all.
How can I inspect and fix this - for example to configure Test trace to write to another file?
Все ответы
-
23 апреля 2012 г. 8:19Модератор
Hi deasturies,
This is not ideally happen. The value of EqtTraceLevel is set to 2 by default, this setting will lead the QTAgnet32.exe generate a concise result about test case, you could set it to 4 for verbose result.
Here is the EqtTraceLevel setting node from QTAgent32.exe.config file, please try to make sure of this node value is not 0 in your test runner:
<system.diagnostics>
<switches>
<!-- You must use integral values for "value".
Use 0 for off, 1 for error, 2 for warn, 3 for info, and 4 for verbose. -->
<add name="EqtTraceLevel" value="2" />
</switches>
</system.diagnostics>
Tony Xiao [MSFT]
MSDN Community Support | Feedback to us
- Помечено в качестве ответа deasturies 3 августа 2012 г. 14:58
-
24 апреля 2012 г. 10:27
Hi Tony Xiao,
as I already said in description - EqtTraceLevel is set to 4 and for another project it creates the correct trace.
Do you know what is the process of trace creation and how can it be affected ?
-
25 апреля 2012 г. 10:10Модератор
Hi deasturies,
I would suggest that you should debug this test and see what will happen. Also you could share us with the debug trace information.
Tony Xiao [MSFT]
MSDN Community Support | Feedback to us
- Изменено Tony xiaoModerator 25 апреля 2012 г. 10:10
-
1 мая 2012 г. 9:14МодераторHi deasturies,
Could you please provide us the *.trx file which you confused with and also get a try on two simple tests which without NHinbernate related. You could update the result of this here and we could get further discuss about this issue.
Tony Xiao [MSFT]
MSDN Community Support | Feedback to us
- Изменено Tony xiaoModerator 1 мая 2012 г. 9:15
-
3 августа 2012 г. 15:04
The issue was fairly simple.
This happened because first project had proper app.config and from what I know it "overrides" any other config file (unless it is not explicitly to use specific config file).
And I had changed %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.config and was expecting it to be taken into consideration.
So finally I've updated project app.config to contain (as per Tony xiao suggestion):
<system.diagnostics>
<switches>
<!-- You must use integral values for "value".
Use 0 for off, 1 for error, 2 for warn, 3 for info, and 4 for verbose. -->
<add name="EqtTraceLevel" value="2" />
</switches>
</system.diagnostics>
and obtained all required detailed trace data.
Thank you for help!

