Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support merging the folders which support the trx files #52

Open
samholder opened this issue Oct 17, 2023 · 10 comments
Open

Support merging the folders which support the trx files #52

samholder opened this issue Oct 17, 2023 · 10 comments

Comments

@samholder
Copy link
Contributor

samholder commented Oct 17, 2023

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:

File at /home/vsts/work/_temp/TestRun2/In/e5919c81-0fce-4782-8a14-28856c4564cc/fv-az461-762/5012254_1_User registers a card and makes a purchase with the stored details.png was not found

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?

@ricardofslp
Copy link
Owner

Hi @samholder ,

That would be a nice improvement yes.
If we control that with flags it would be ok for me

@samholder
Copy link
Contributor Author

ok, I've got a busy week this week, but I will look to get something together over the next couple of weeks

@ricardofslp
Copy link
Owner

Hi @samholder,

Could you provide an example of the output you want to merge. This way I could start working on that first.

@ricardofslp
Copy link
Owner

Hi @samholder,

Any luck on this?

@samholder
Copy link
Contributor Author

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.

@samholder
Copy link
Contributor Author

AttachmentsInMsTest.zip

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

@ricardofslp
Copy link
Owner

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

@samholder
Copy link
Contributor Author

Thanks, I'll try and have a look at this at some point this week

@samholder
Copy link
Contributor Author

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

@ricardofslp
Copy link
Owner

Hi @samholder ,

Can you give some more feedback on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants