b3b00 / coverlet-action

coverlet github action
MIT License
5 stars 4 forks source link

How to execute XUnit Test Suite? #14

Closed agray closed 1 year ago

agray commented 1 year ago

Does Coverlet Action support running XUnit Selenium Test suites?

https://github.com/Sauceforge/Saucery/actions/runs/4713229931/jobs/8359042382

Am I doing something stupid?

Works for NUnit but failing for the XUnit suite.

b3b00 commented 1 year ago

could you try run

run dotnet test -c Debug -p:coverletOutput=opencover.xunit.integration.xml -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:Exclude=\"[Merlin.XUnit]Tests.*\" Merlin.XUnit/Merlin.XUnit.csproj

and get the output. look if a xml output file is generated

b3b00 commented 1 year ago

Hello @agray , I 've tried to run tests locally using a free trial account and I get 16 unit tests failing with following message

Message d'erreur :
   OneTimeSetUp: System.Collections.Generic.KeyNotFoundException : The given key 'x-ratelimit-remaining' was not present in the dictionary.
  Arborescence des appels de procédure :
  Échoué SupportedRealDevicePlatformTest [792 ms]

Do you know how I can avoid these to get your unit tests passing an debug coverlet-action ?

May be the cause is that I am behind a corporate proxy that filter too much. in which case i won't be able to help easliy

Olivier

agray commented 1 year ago

I don't see them when I run locally or on saucelabs. I have a open sauce account with 5 parallel tests

On Mon, 17 Apr 2023, 5:10 pm Olivier Duhart, @.***> wrote:

Hello @agray https://github.com/agray , I 've tried to run tests locally using a free trial account and I get 16 unit tests failing with following message

Message d'erreur : OneTimeSetUp: System.Collections.Generic.KeyNotFoundException : The given key 'x-ratelimit-remaining' was not present in the dictionary. Arborescence des appels de procédure : Échoué SupportedRealDevicePlatformTest [792 ms]

Do you knwo how I can avoid these to get your unit tests passing an debug coverlet-action ?

Olivier

— Reply to this email directly, view it on GitHub https://github.com/b3b00/coverlet-action/issues/14#issuecomment-1510820262, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA42VQFX2P72MTZYQVJ3STXBTUFFANCNFSM6AAAAAAXAFFCJU . You are receiving this because you were mentioned.Message ID: @.***>

b3b00 commented 1 year ago

@agray, have you try to run coverlet locally and check if the output file is correctly generated ?

agray commented 1 year ago

I won't have a chance to try your suggestions until next weekend at the earliest.

Thanks for looking into it. Hold fire. I'll let you know.

On Tue, 18 Apr 2023, 4:40 pm Olivier Duhart, @.***> wrote:

@agray https://github.com/agray, have you try to run coverlet locally and check if the output file is correctly generated ?

— Reply to this email directly, view it on GitHub https://github.com/b3b00/coverlet-action/issues/14#issuecomment-1512522864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA42VVVOF7A4BRE4RDQICLXBYZMRANCNFSM6AAAAAAXAFFCJU . You are receiving this because you were mentioned.Message ID: @.***>

agray commented 1 year ago

I have executed the same command that is failing in GitHub Actions:

dotnet test -c Debug -p:coverletOutput=opencover.xunit.integration.xml -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:Exclude=\"[Merlin.XUnit]Tests.*\" Merlin.XUnit/Merlin.XUnit.csproj

image

image

It appears that it did not write the coverletOutput file to disk.

image

This aligns with the error I am seeing in GitHub Actions as it appears that step is looking to confirm that file exists and erroring cause it doesn't:

image

That error message is coming from line 143 of index.js:

https://github.com/search?q=repo%3Ab3b00%2Fcoverlet-action++%22coverage+file+not+found%22&type=code

b3b00 commented 1 year ago

Hello, thanks for your answer. could you look if you find the output file somewhere else in your repo ? particularly at the root. Maybe convertlet-action does not look for it at the right place.

agray commented 1 year ago

Found the problem. It was my oversight. I was missing a reference to coverlet.msbuild.