ricardofslp / dotnet-trx-merge

Merge trx files
https://www.nuget.org/packages/dotnet-trx-merge
MIT License
9 stars 4 forks source link

NullReferenceException thrown when runUser missing #97

Closed mullerj closed 4 months ago

mullerj commented 4 months ago

dotnet_trx_merge.Services.TrxFetcher.FetchOnlyLatest(String[] filesToMerge) throws NullReferenceException when runUser attribute is missing from the root element.

samholder commented 4 months ago

I've noticed this has started recently, and I think its mstest no longer adding this user to the trx

anyway, I've created a PR to address this and default the runUser if its not found

ricardofslp commented 4 months ago

Hi @mullerj,

Thanks for reporting this.

@samholder thanks for the PR I will take a look

ricardofslp commented 4 months ago

Hi @mullerj,

Please test version: https://www.nuget.org/packages/dotnet-trx-merge/2.0.1 Please provide feedback to see if we can close the issue

samholder commented 4 months ago

This looks like it works to me, I see the warning output when I run this in my devops pipeline and merge happens now.

thanks for the quick merge and new version @ricardofslp

mullerj commented 4 months ago

I tested with a trx file that is missing the runUser attribute and NullReferenceException is no longer thrown.