Build 1754: MsTest action throws NRE

Hi, it seems, the unit tests were green, but at the end, an NRE is thrown.

This is shown in the log:

Passed EntityTests.IRevertableChangeTracking
Passed EntityTests.Nulls
Passed EntityTests.SerializeArray
Passed EntityTests.SerializeNonArray
Passed EntityTests.SetDirtyReadOnly
Passed EntityTests.SetReadOnly
80/80 test(s) Passed

Summary
-------
Test Run Completed.
Passed 80
----------
Total 80
Results file: C:\BuildAgent\Ws\44\MSTestOutput_130096146394719387.trx
Test Settings: Default Test Settings

Action has failed due to an error.
Object reference not set to an instance of an object.


Hi Christian

I haven’t been able to reproduce this here, so I suspect there must be something in the trx file we are not parsing properly. Are you able to send us the trx file (to support at finalbuilder.com) so we can run the parser over it under the debugger?

Also, which version of MSTest are you using?

I’am using mstest from Visual Studio 2010 Professional (10.0.30319).

The TRX has been sent via mail right now.

Hi Christian

Is this error repeatable? So far I have not been able to reproduce the problem, and the parser is able to parse the trx file without any problems.

yes it is repeatable.

is it possible to look for a callstack or something in the log files? some debug output option, so i can assist you?

We will need to modify the action as the stack trace is not being logged.

so it seems it depends on one of our projects. i’ve tested both separatly and the last one finished successfully. the other one throws the exception.
maybe i can find the difference in visual studio. i’ll have a look.

so the NRE comes directly before any test is executed. so it seems it has nothing to do with the TRX file. must happen before or with the execution of mstest.exe

i can’t find anything. waiting for the log now.

What settings do you have on your MSTest action. I have changed the error handling so that it logs the stack trace when parsing the results file, however so far I have not been able to get any errors.

as is said, its only throwing that NRE on one specific project. all other work. as the action occurs, before any output is visible, i think is doesn’t depend on the TRX file at all.
i’ve just set the pattern for .dll test libraries. nothing special.

Ok, test again with the next build (hopefully later today) and lets see what the logging reports.

An Error occurred parsing results file : C:\BuildAgent\Ws\99\Source\MyProject\Bin\Tests\Results.trx.

Is that all? No exception info?

Hmmm… it should be logging more than that in the build log.

seems not.

who is parsing the .trx file? some internal code or do you use something i can test here by mysql?
because the tests were executed and the result file seems to be complete.

We are, it’s an xml file. That’s why I asked you for your trx file before, I added a unit test to parse the file and it it’s parsing fine. I will look at the logging again today and try parsing and invalid file. What would be really useful is if you are able to provide us with the assemblies you are testing, then we would be able to run the action against them and see what is going on. Don’t post them here, zip up and email to support at finalbuilder.com

“mysql”? i mean “myself” i’ll check this and send them to you, if possible.

so i’m not permitted to send you those assemblies. Isn’t it possible to simply log the exception message etc, so we can get closer to it?