testfx icon indicating copy to clipboard operation
testfx copied to clipboard

Deployment Items don't work using runsettings file

Open NetanelMosheCohen opened this issue 6 years ago • 2 comments

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

NetanelMosheCohen avatar Jan 14 '20 09:01 NetanelMosheCohen

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.

N-Olbert avatar Mar 29 '20 18:03 N-Olbert

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"

kavyashreer23 avatar Oct 09 '20 06:10 kavyashreer23

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

engyebrahim avatar Feb 10 '23 10:02 engyebrahim