Thank you for the sample project. I was able to reproduce the problem and now I fully understand what exactly is going on. First please pay close attention to the reported error:
System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "TestStudioProject.Resource.resources" was correctly embedded or linked into assembly "TestStudioProject" at compile time
, or that all the satellite assemblies required are loadable and fully signed.
The .resx file is actually another type of source code file. You can have more than one of them in a project. Just like your .cs files they get compiled into binary code as a .resources file. At run time the static Resource class searches the .resources file for the specified resource in order to use it.
Unfortunately the Test Studio IDE does not understand .resx files. As a result it does not compile them to generate a .resources file for the test to use. As a result at runtime the static Resources file cannot find the specified resources.
As an alternative I recommend you use either:
1) A data driven test
. This is probably the easier approach to what you're trying to achieve.
2) An app.config file
, the content of which can be set via Visual Studio settings as shown in the attached screen shot. We also have this article how to correctly use the app.config file
"In VS, if I launch multiple (indipendent) tests using the VS's Test Explorer, sometimes some tests fail without a reason."
I have no explanation for this. I would like to track this as a separate problem in a separate ticket so it doesn't get mixed up with the .resx issue. Please start a new support ticket or forum thread on this new problem. In there please attach the test log showing the failure. We'll start diagnosing the problem based on what the log shows us.