microsoft / testfx

MSTest framework and adapter
MIT License
714 stars 253 forks source link

Deployment Items don't work using runsettings file #676

Closed NetanelMosheCohen closed 1 year ago

NetanelMosheCohen commented 4 years ago

I'm trying to migrate our automation project - Selenium + C# +MSTest V1 to MSTest V2. Until now I worked with testsettings file and used DeploymentItem to deploy few files to the output folder. But now I have to use runsettings file and the deployment items option is not working. I tried to use legacy settings but it still doesn't work. I searched all over the internet for something which describes how to do this but nothing has worked.

Attached testsettings (that managed to deploy items) and runsettings files (that did NOT manage to deploy items).

Is there something missing in my runsettings file? Can someone please provide me with a runsettings file which was tested and managed to actually deploy items?

Thanks

Environment

.NET Framewok - 4.6.1 Programming language - C# Test Adapter and version - MSTest V2 (latest) OS - Win 10

RapNet.zip

N-Olbert commented 4 years ago

LegacySettingsd arent supported in MSTestV2.. https://github.com/Microsoft/testfx/issues/557#issuecomment-460155882

Maybe checkout the DeployTestSourceDependencies-Attribute or use plain DeploymentItem-Attributes.

I stumbled accross this myself a year ago. The documentation is very poor here.

kavyashreer23 commented 3 years ago

Hi, Does changing to .runsettings from .testsettings file, support remote deployment in Test Controller and Agents with MSTestV2 ? How to use the below attributes in .runsettings file. Can anyone please help on this? RemoteController name="Test Controller name" AgentRule name="All agents"

engyebrahim commented 1 year ago

it's related to this PR too https://github.com/microsoft/testfx/pull/1571 as useing legacy settings aren't supported anymore inside the testsettings