Open samholder opened 10 months ago
Hi @samholder ,
That would be a nice improvement yes. If we control that with flags it would be ok for me
ok, I've got a busy week this week, but I will look to get something together over the next couple of weeks
Hi @samholder,
Could you provide an example of the output you want to merge. This way I could start working on that first.
Hi @samholder,
Any luck on this?
Hi.
Apologies for going dark on this, I've been too busy to think about this. I will attempt to get an example of what needs to be merged together to show as soon as I can.
I've added an example, with a project to generate the files with attachments. You can see from this that there is one test and in the first run it fails, but in the second run it passes and generates an attachment. In the merge it would be good to include all attachments for passing tests. If failing tests pass in subsequent runs then all attachments should only be for the passing tests I think. If a tests fails repeatedly, then I think attachments for one of those failing tests I think, probably the most recent one.
The attachment contains trx files from a failed run and a subsequent passing run, but if you need more info you should be able to alter the project to generate more attachments etc if you need to
Hi @samholder,
Can you test using this version https://www.nuget.org/packages/dotnet-trx-merge/2.0.0-alpha.0 ? Add the option -c or --copyOriginalFiles
Thanks, I'll try and have a look at this at some point this week
I had a look at this over the weekend, but I was getting an exception when merging the trx when there was only one trx to merge. not sure if this was an existing issue, but I thought that if all the tests passed on the first run and I only had a list of 1 trx file to merge that this would work ok
I'll try and get the trx files that caused the issue, but by default our builds don't spit them out
Hi @samholder ,
Can you give some more feedback on this?
Hi.
I've been expanding use of this and we have some tests that run against the UI and take screenshots and produce code coverage. I've noticed that I get warnings saying that the output is missing when uploading the results, something like:
This seems related to the fact that we also get an output folder matching the trx name, and once we have merged the trx files this folder does not match the new trx name. I've testing manually and if I move the files from the folder
<trxfileName>
to<mergedTrxOutputFileName>
then the warnings go away and it seems happy.I'm proposing to add an additional flag to allow merging of supporting folders as well as the trx files, along with a flag to allow deleting of the merged folders (and potentially of the original trx files).
I also think an option to move the trx files/supporting folders to a zip archive which can be uploaded as a build artifact would also be useful, and simpler than having to write the powershell to do it in the pipeline itself.
This would probably be a few PRs, starting with merging supporting folders.
Is this something you would want?