Getting verbose logs from the Test Adapter under Team Build?

429 views
Skip to first unread message

Chris Raplee

unread,
Oct 23, 2012, 12:25:59 PM10/23/12
to nunit-...@googlegroups.com
Hey - could I get some guidance on how to enable more verbose logging and/or info on where such logs get written to when using the Test Adapter to run unit tests on the build server? We're running against TFS 2012 using the default build template and the Visual Studio Test Runner. Testing never progresses past the first test assembly and additional checkpointing information, stdout, stderr, etc. would all be useful in trying to understand why. 

I've pulled lp:nunit-vs-adapter and built local thinking that the resolution for #1021144 might be at least part of the solution but don't seem to be seeing more data showing up in VS for this when I look at build results. 

Thanks,
Chris Raplee


Charlie Poole

unread,
Oct 23, 2012, 12:50:19 PM10/23/12
to nunit-...@googlegroups.com
Running inside the IDE, the output is displayed in the VS output window, so
we know it's being properly sent. I'm not sure how the Visual Studio Test
Runner handles output messages it receives.

What does your command line look like?

Charlie
> --
> You received this message because you are subscribed to the Google Groups
> "NUnit-Discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nunit-discuss/-/eZthW8eTW6cJ.
> To post to this group, send email to nunit-...@googlegroups.com.
> To unsubscribe from this group, send email to
> nunit-discus...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nunit-discuss?hl=en.

Chris Raplee

unread,
Oct 23, 2012, 1:00:30 PM10/23/12
to nunit-...@googlegroups.com
I don't have a command line, per se. The invoking XAML is out of the box DefaultTemplate.11.1.xaml rigged to run **\*test*.dll. If I'm reading the XAML right the invocation would come from:

    <mtbwa:RunTests DisplayName="Run Visual Studio Test Runner for Test Sources" RunName="[agileTestPlatformAssembly.RunName]" Flavor="[platformConfiguration.Configuration]" Platform="[platformConfiguration.Platform]" TestSources="[agileTestPlatformAssemblies]" TestCaseFilter="[agileTestPlatformAssembly.TestCaseFilter]" ExecutionPlatform="[agileTestPlatformAssembly.ExecutionPlatform]" />


Chris

Charlie Poole

unread,
Oct 23, 2012, 2:51:28 PM10/23/12
to nunit-...@googlegroups.com
Hi Chris,

Unfortunately, I'm not at all familiar with running tests under TFS and
I think it's definitely out of the question to write a test case that
invokes it.

Can somebody who is chime in here? What's a simple command-line
equivalent that will allow duplicating the problem with non-displayed
output. All that xml has to boil down to running some program with
some arguments.

Charlie
> https://groups.google.com/d/msg/nunit-discuss/-/Opo_FMycTXAJ.

Chris Raplee

unread,
Oct 23, 2012, 7:07:20 PM10/23/12
to nunit-...@googlegroups.com
I don't know what the 1:1 command line equivalent would be and I'm not sure how to derive it. I had thought that the XAML there was just a funny looking way of calling into the Microsoft.TeamFoundation.Build.Workflow.Activities.RunTests() method which would then, presumably, chain into the Adapter's Discoverer and Executor objects to invoke the tests and, (again) presumably, send the output back to TFS to be committed into the DB. 

Am I off base here? Am I approaching the problem from the wrong direction? Are there any switches/settings/env vars/etc which will make the Adapter give more verbose output? Does it have a log of its own I can look for to see where it's hanging/which of my tests is causing the hang? 

Thanks, 
Chris

Charlie Poole

unread,
Oct 23, 2012, 9:54:03 PM10/23/12
to nunit-...@googlegroups.com
Even though I don't have any knowledge about using TFS in this context,
I'm figuring somebody on this list does. Let's see if someone can help us.

Please guys!

Meanwhile, I do have folks at Microsoft I can ask.

Charlie
> https://groups.google.com/d/msg/nunit-discuss/-/5wSf9sSvvyAJ.

Chris Raplee

unread,
Oct 24, 2012, 4:02:29 PM10/24/12
to nunit-...@googlegroups.com
Apologies it this double-posts - the Google Groups Web UI is giving me some difficulty today. 

As per the task manager it looks like the only arguments which get passed to the vstest.executionengine and vstest.discoveryengine EXEs is "/parentProcessId " and the PID of the TFS Build Service process. So it looks like the details of the requested test run get handed off via some IPC and not command line arguments. 

I went ahead and added some breadcrumb logging to the test adapter, however, and have a clearer picture of where my specific hang was coming from and am, I hope, past that point. 

Chris
Reply all
Reply to author
Forward
0 new messages