It's all about the answers!

Ask a question

mstestLogPublisher not working for VS2013 when utilizing vstest.console.exe


Bradley Lahr (62512) | asked Apr 29 '15, 1:40 p.m.
 We've switched our project from executing tests with MSTest  to vstest.console.exe with the /Logger:trx option.   This was done to take advantage some Code Coverage capabilities.   The .trx file that is generated with this new execution is unable to be published back to RTC with mstestLogPublisher.

Can anyone else confirm this behavior?  Is there a plan to fix it, or is there a workaround available?

 Publishing test log "e:\jazzWorkspace\TestResults\Results.trx".
 java.lang.IllegalArgumentException: The parameter "testClassName" must not be null.
  at com.ibm.team.build.internal.common.helper.ValidationHelper.validateNotEmpty(ValidationHelper.java:130)
  at com.ibm.team.build.internal.parser.data.JUnitParserTestCaseData.<init>(JUnitParserTestCaseData.java:68)
  at com.ibm.team.build.internal.toolkit.mstest.MSTestParser.startElement(MSTestParser.java:182)
  at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
  at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
  at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  at com.ibm.team.build.internal.toolkit.unit.UnitParser.parse(UnitParser.java:54)
  at com.ibm.team.build.internal.toolkit.mstest.MSTestParser.parse(MSTestParser.java:94)
  at com.ibm.team.build.internal.toolkit.unit.UnitLogParser.parse(UnitLogParser.java:77)
  at com.ibm.team.build.internal.toolkit.unit.UnitLogParser.parse(UnitLogParser.java:66)
  at com.ibm.team.build.internal.toolkit.unit.UnitLogPublisher.publishFile(UnitLogPublisher.java:226)
  at com.ibm.team.build.internal.toolkit.unit.UnitLogPublisher.publish(UnitLogPublisher.java:181)
  at com.ibm.team.build.ant.task.UnitLogPublisherTask.updateBuildResult(UnitLogPublisherTask.java:131)
  at com.ibm.team.build.ant.task.AbstractPublisherTask.doExecute(AbstractPublisherTask.java:105)
  at com.ibm.team.build.ant.task.AbstractTeamBuildTask.execute(AbstractTeamBuildTask.java:666)
  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:435)
  at org.apache.tools.ant.Target.performTasks(Target.java:456)
  at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
  at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
  at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
  at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:435)
  at org.apache.tools.ant.Target.performTasks(Target.java:456)
  at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
  at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
  at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
  at org.apache.tools.ant.Main.runBuild(Main.java:851)
  at org.apache.tools.ant.Main.startAnt(Main.java:235)
  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Comments
Bernd van Oostrum commented Oct 02 '17, 9:02 a.m. | edited Dec 04 '17, 4:24 p.m.

Confirmed!


Is there any support for the more 'recent' TRX-files? (=> VS2013)
- format has changed
- TRX-files are not created by MSTEST anymore

Best regards,
Bernd.


2 answers



permanent link
Bernd van Oostrum (21724665) | answered Dec 01 '17, 2:53 a.m.

 Any update on this?


Comments
1
Donald Nong commented Dec 01 '17, 2:59 a.m.

This is a forum and no one is obliged to give a response. If you need a timely response, please open a ticket with IBM Support.


permanent link
Patrick Paquette (371018) | answered Dec 05 '17, 5:12 p.m.

We took a look at the difference.


It seems VSTest.Console uses Type.FullName where MSTest uses Type.AssemblyQualifiedName for the className attribute of the TestRun\TestDefinitions\UnitTests\TestMethod element in the TRX file.  Jazz expects this by looking for the name of the class for everything before the first ',' (comma) in the className.  Since there is no comma anymore in VSTest.Console, the class name looks like an empty string when passed to the constructor of the JUnitParserTestCaseData.

The order is slightly wrong as well (Times shows up before TestSettings).

We pass the TRX through an XSLT to clean it up (add the comma and reoder), and it works fine now.


Your answer


Register or to post your answer.