Closed agray closed 1 year ago
hello @agray , i'm starting to look at it
@agray , I'm not able to reproduce your error. unit tests fail with error
A total of 1 test files matched the specified pattern.
Setup failed for test fixture Merlin.OpenSauceTests
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> System.TypeInitializationException : The type initializer for 'Merlin.RequestedPlatformData' threw an exception.
----> System.Collections.Generic.KeyNotFoundException : The given key 'x-ratelimit-remaining' was not present in the dictionary.
Failed ClickLinkTest [15 ms]
Error Message:
OneTimeSetUp: System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> System.TypeInitializationException : The type initializer for 'Merlin.RequestedPlatformData' threw an exception.
----> System.Collections.Generic.KeyNotFoundException : The given key 'x-ratelimit-remaining' was not present in the d
So coverlet -action does not even try to extract coverage. Am I missing something to make your tests run. I've got my own trial user/key from saucelabs API to test.
@agray could you provide the output of the dotnet test command runned by the action ? this way I may be able to reproduce and try to fix.
The full command to run in your project root dir is
run dotnet test -c Debug -p:coverletOutput=opencover.xml -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:Exclude=\"[UnitTests]Tests.*,[Saucery]AutoGeneratedProgram,[Saucery]Saucery.Selenium.*,[Saucery]Saucery.Driver.SauceryAndroid*,[Saucery]Saucery.Driver.SauceryIOS*,[Saucery]Saucery.Tests.SauceryAndroid*,[Saucery]Saucery.Tests.SauceryIOS*,[Saucery]Saucery.DataSources.EnvCompositor*,[Saucery]Saucery.Util.WebControl\" UnitTests/UnitTests.csproj
thanks
@agray I've just published v1.2.5 it may fix the issue and allow extra debug info. simply add a debug: true param to coverlet-action in your workflow file (see coverlet-action readme)
trying with version 1.2.5 and debug: true https://github.com/Sauceforge/Saucery/actions/runs/4334401649 failed but this worked: https://github.com/Sauceforge/Saucery/actions/runs/4334713671
Pull Request Merge job: https://github.com/Sauceforge/Saucery/actions/runs/4334979904
Wondering if we have an intermittent issue?
The first build (https://github.com/Sauceforge/Saucery/actions/runs/4334401649) failed because there were 3 unit test that failed. It 's not an issue wirth coverlet-action per se. Two others seem to demonstrate that the fix.... fixes your issue. Think about removing the debug flag as it cluttered the build output.
Thanks for reporting and helping solve the issue.
Please see: https://github.com/Sauceforge/Saucery/actions/runs/4273655280/jobs/7439710011