Exception initializing statlight for some xap files

Aug 25, 2015 at 2:21 PM

I have a wierd issue running my SL test on the server. Some of my xap files are running and others throw an exception when statlight is initializing:

System.ArgumentNullException: Value cannot be null.
Parameter name: value
at System.Xml.Linq.XAttribute..ctor(XName name, Object value)
at StatLight.Core.Reporting.Providers.MSTestTRX.TRXReport.<>c__DisplayClass2.<GetXmlReport>b__0(TestCaseResultServerEvent test)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
at System.Xml.Linq.XElement..ctor(XName name, Object content)
at StatLight.Core.Reporting.Providers.MSTestTRX.TRXReport.GetXmlReport()
at StatLight.Core.Reporting.Providers.MSTestTRX.TRXReport.WriteXmlReport(String outputFilePath)
at StatLight.Core.RunnerExecutionEngine.WriteXmlReport(TestReportCollection testReports, String xmlReportOutputPath, ReportOutputFileType reportOutputFileType)
at StatLight.Core.RunnerExecutionEngine.Run()
at StatLight.Console.Program.Main(String[] args)
I was having a look to the source code and the problem seems to be on StatLight.Core.Reporting.Providers.MSTestTRX.TRXReport.GetXmlReport() when calling to GetGuidForItem() method. This returns null for some of my projects and no SL tests are executed therefore. Any idea why? I've checked all my projects properties but everything seems to be correct and aligned between projects working fine and projects not working like expected.

I've been investigating long time without any clue. Any help will be really appreciated.

Best regards,

Oct 26, 2015 at 5:01 PM
Edited Oct 26, 2015 at 5:05 PM
Short update regarding this issue: The issue is not when initializing Statlight itself, is when initializing my tests. I finally found the root cause --> A reference to one of my dependent assemblies was missing in my project running these tests. In order to identify the issue, I ran those tests locally instead of the build server to have more info about the error: The console showed me the exact missing assembly.