0

I'm using dotnet test to get the code coverage of a given dotnet code project. In this case final out put will be looks like below.

C:\Program Files (x86)\Jenkins\workspace\Backend Dev\test\Api.Test\TestResults\88de1678-d457-4e6c-a3fd-2d5786cddc13\ar0_2020-06-18.10_24_43.coverage
Total tests: 132. Passed: 66. Failed: 57. Skipped: 9.
Test Run Failed.
Test execution time: 44.3640 Seconds

As you can see the folder name is a unique ID and the report name also a unique ID. So is there any way to get this result in to a my own folder and is there any way to rename the file name while it's generating to something readable.

4
  • Have you tried deleting all content of the TestResults folder before the execution and then fetching the only file in the folder after the execution? – João Farias Jul 7 '20 at 6:39
  • Yeah I did, But still its creating a folder with an ID inside the test result folder. – ChathuD Jul 7 '20 at 6:47
  • Yes, then you can search for all files in the TestResults that end with .coverage. Since you delete all before, you will have only one afterward. find . -name "(pathToTestFolder)/*.jpg" does the job. – João Farias Jul 7 '20 at 7:16
  • Thanks,At the moment I'm doing something like that, But I was looking for some better way :). – ChathuD Jul 7 '20 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.