I'm really new here and started writing some UI tests using selenium and testng and wanted to know how do you structure the folders, it is a maven project and using java. I'm putting all the test files in src/test/java, is that the correct apporach? Noted it will run my UI tests when building, not sure if I want that.
-
1not sure if I want that. What exactly do you want to achieve?Alexey R.– Alexey R.2019年01月09日 13:14:29 +00:00Commented Jan 9, 2019 at 13:14
-
It's a new project, nothing is done yet and there is a lot yet to be defined, but the idea is to start with ui tests, integrate with jenkins and run the tests remotely.user36524– user365242019年01月09日 13:37:09 +00:00Commented Jan 9, 2019 at 13:37
1 Answer 1
If you want your tests to be controlled by Maven you have to adhere maven convention to house-keep your tests. Hence you have to keep them in your test source folder (that can actually be overwritten in pom.xml
file).
Normally tests are executed via surefire plugin that has the documentation here. More specifically, you can discover that you can disable test execution by default and run your goal with -DskipTests=false
argument when you want them not to be skipped.
There is also an option not to bind your tests to Maven. There is some specific though. You'll have to run your tests straight from your code and this way is different in different test frameworks. Here is my example for TestNg: https://sqa.stackexchange.com/a/36905/27679
-
Thanks, this answers my question completely and you also provided extra info and some really useful links!user36524– user365242019年01月09日 16:14:15 +00:00Commented Jan 9, 2019 at 16:14