Any ways/hacks to do parameterized classes/assemblies today #2897
Replies: 1 comment
-
You're definitely going to have to do this. The issue is that while the test code is the same, the test environment isn't the same. The test runners need to know which environment to run the code in, and right now that's based on what the target framework(s) are for the test project.
AFAIK, there's no support in (Windows) Visual Studio's test runner to run anything from iOS/Android/Mac. In the past for xUnit.net v2 we had a own "devices runner" that was provided by a third party. That project has been abandoned as the maintainer is no longer interested in keeping it alive. The only target frameworks we intend to support in xUnit.net v3 are .NET Framework 4.7.2+ and .NET 6+. There are no plans for v3 for any other target frameworks, though again an interested third party may step up (once v3 is released) and provide some support there. |
Beta Was this translation helpful? Give feedback.
-
Hey all! I am on my phone in bed, so excuse any bad typing... I am wanting to write some UI tests with Appium for multiple platforms, but I am not sure the best way to duplicate all the things.
If I have a bunch of classes with a bunch of tests, I want to run them all for the iOS/Android/Mac Catalyst/Windows. Appium uses the same APIs so the tests are the same. Imagine writing a test to enter text in a box and then clicking a button.
I can use multiple assemblies and link in the code. I can also use envvars on say CI, but I need this to work in VS. I also create a base class with tests and inherit for each platform, but this gets really messy.
I am just wondering what other cool ways of solving this are?
This issue may be the solution, but also maybe not and it is not implemented yet so not an option. #2150
Beta Was this translation helpful? Give feedback.
All reactions