make rider read .runsettings when executing tests
Answered
When I run "dotnet test -s xyz.runsettings" it will pickup run settings and configure test run accordingly. Now I want to make rider use specific run settings.
I found Preferences => Unit Testing => Test Runner where it says: "Use specific .runconfig/.testsettings settings file:" but this seems not to take any effect.
Seems as unrelated but as a test framework I'm using xunit.
Please sign in to leave a comment.
Hello,
I have tested it in my lab, and I can see Rider pick up settings from *.runsettings file. Could you please provide the logs collected via Help | Collect logs and upload it with a new issue on our tracker? Thank you in advance!
Thanks Olga for reply, would it be possible for you to provide your lab project?
I take sample from xunit github page and .runsettings example from MS page. Playing around with basic parameters like TargetPlatform, TargetFrameworkVersion and TestSessionTimeout shows that changes take place on tests.
Hello Olga, I created sample project https://github.com/vmachacek/xunit-runsettings there is local.runsettings file which contains environment variables which are not picked up by Rider.
I have set up the runsettings file in the Rider's settings.
Can you please check?
Also I run the project in VS to double check if it is set up correctly
Vmachacek, thank you for your test solution, I have reproduced it on our side and created a corresponding record on our bug tracker: RSRP-483511. Please watch the issue there for monitoring the progress on it.
Olga Diakonova I'm having problems getting RunSettings to work using Rider.
When I look at the bug, RSRP-483511, it only mentions R#, and not Rider. Might the bug still exist in Rider?
Hello Petter Wichman,
Rider and ReSharper share the test runner code, so the fix should've made it to Rider as well. Would you please provide more information about your scenario? Which test framework do you use?
When I renamed the file .dev.runsettings to .runsettings it worked.