Java, Maven, Appium, Cucumber
Project structure - packages:
- android
- ios
- features
Test cases are located in the package features - used Cucumber.
Tests run:
- build jar file
- through Intellij IDEA
Now features (test cases on Cucumber) used the tag @ios-simulator. By this tag Cucumber finds the class with @Before(value="@ios-simulator") - run tests only for iOS. If you change all tags in the features to @android this will run tests under Android.
Problem: choose a platform for tests run -> change all tags in all test cases in the feature - an uncomfortable and routinely.
Goal: platform name must be stored in one place, for example in the pom.xml file. Cucumber or something else take this value and runs tests for selected platform (by choosing appropriate package). Or by command: mvn test -Dandroid - if maven is used.
Cucumber is response for tests runing. But how to choose the platform more comfortable - I do not know. Dynamically generate tags in features (take platform-name-value from the pom.xml file) doesn't work.
How to do this task by Maven or by Cucumber? Any ideas