Only converting NUnit XML logs to TRX

Dec 17, 2011 at 12:32 AM
Edited Dec 17, 2011 at 12:36 AM

Hello,

I'm so glad to find this project and you guys have done a wonderful job. I downloaded v1.2 of the archive and played around with the application however; ironically, it does more than what I actually need!

So, we don't use Team Build for our builds and we have our own custom test portal where test results from a number of different automated test harnesses are published. Unfortunately. in the unit test tab, there is only one test type - Visual Studio Unit Tests.

My request for builing a separate web page where NUnit XLM logs can be published is falling on deaf ears so I decided to opt for this approach - converting (or transfoming) the xml's to trx and then publishing them to our test portal under VS Unit Tests.

Basically, I just need a TRX file for every XML file in my test output directory (I'll create a batch script to run recursively) but the application is not designed to work that way. 

If I run the applicaiton with only -n and -o parameters then I get this message [I understand this is not suppoed to work]

C:\NUnitToMSTest>NUnitTFS.exe -n ABC.xml -o XYZ.trx

Argument {0} is not marked as optional and was not found on the commad line.

(BTW: The argument number does not change for any condition and the spelling of 'command' is incorrect - things to fix for the next release)

If I run the application with all the 'required' parameters then I get this message [I purposely entered arbitary values for teamproject and build values]

C:\NUnitToMSTest>NUnitTFS.exe -n ABC.xml -t PQR -b 100 -o XYZ.trx

Transforming NUnit output...
Loading XSLT from NUnitToMSTest.xslt
Loading NUnit Output from ABC.xml
QueryBuilds
System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://teamfoundation:8080/Build/v2.0/BuildService.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote
 name could not be resolved: 'teamfoundation'
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
   --- End of inner exception stack trace ---

Server stack trace:
   at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
   at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean one way, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at KWatkins.NUnitTfs.BuildServiceV2.BuildServiceSoap.QueryBuilds(BuildDetailSpec[] specs)
   at KWatkins.NUnitTfs.Publisher.GetBuildDetails(String teamProject, String buildNumber) in D:\Development\NUnitTFS\NUnitTFS\Publisher.cs:line 107
   at KWatkins.NUnitTfs.Publisher.Publish() in D:\Development\NUnitTFS\NUnitTFS\
Publisher.cs:line 35
   at KWatkins.NUnitTfs.Program.Main(String[] args) in D:\Development\NUnitTFS\NUnitTFS\Program.cs:line 19

It would be really nice if someone can explain how can I achieve what I am looking for.

Some Details:

Visual Studio 2010 Professional is installed - is this required?

Logs are from NUnit 2.5.10

Looking forward for some suggestion. Thanks in advance.

- GJ

 

Jan 24, 2012 at 6:46 PM

Hello,

It would be really nice if someone responded to this post. Thanks.

- GJ

Jul 19, 2012 at 11:35 PM

I had this problem too and ended up needing to make sure I had quotes pretty much everywhere.

NUnitTfs.exe -n \\<build_server>\TFSBuilds\CI\CI_20120719.1\logs\Project.Tests.dll.ResultXml.xml -t "My Project" -p "Any CPU" -f Debug -b "CI_20120719.1" -v 2010

Originally I didn't have quotes around the -t parameter for My Project. I updated the InvokeProcess arguments to this:

String.Format("-n {0} -t ""{1}"" -p ""{2}"" -f {3} -b ""{4}"" -v 2010", testResultXmlPath, BuildDetail.TeamProject, BuildSettings.PlatformConfigurations(0).Platform, BuildSettings.PlatformConfigurations(0).Configuration, BuildDetail.BuildNumber)

Now I'm down to the "System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://my_server:8080/tfs/Build/v3.0/BuildService.asmx that could accept the message".

Hope that helps,

 Henry

Jul 21, 2012 at 12:47 AM
Hey Henry,
Thanks a lot for the response. I kept this task aside since I didn't hear from anyone. Now that you have replied with some solution, I'll try it out and let you know. Thanks again.
- GJ

On Thu, Jul 19, 2012 at 4:35 PM, HenryCC <notifications@codeplex.com> wrote:

From: HenryCC

I had this problem too and ended up needing to make sure I had quotes pretty much everywhere.

NUnitTfs.exe -n \\<build_server>\TFSBuilds\CI\CI_20120719.1\logs\Project.Tests.dll.ResultXml.xml -t "My Project" -p "Any CPU" -f Debug -b "CI_20120719.1" -v 2010

Originally I didn't have quotes around the -t parameter for My Project. I updated the InvokeProcess arguments to this:

String.Format("-n {0} -t ""{1}"" -p ""{2}"" -f {3} -b ""{4}"" -v 2010", testResultXmlPath, BuildDetail.TeamProject, BuildSettings.PlatformConfigurations(0).Platform, BuildSettings.PlatformConfigurations(0).Configuration, BuildDetail.BuildNumber)

Now I'm down to the "System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://my_server:8080/tfs/Build/v3.0/BuildService.asmx that could accept the message".

Hope that helps,

Henry

Read the full discussion online.

To add a post to this discussion, reply to this email (nunit4teambuild@discussions.codeplex.com)

To start a new discussion for this project, email nunit4teambuild@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Coordinator
Jul 24, 2012 at 4:35 AM

Thanks Henry.  I didn't think about needing to quote anything with a space in it. My bad.