0

My project structure is as below:

module 1
    src
    test/UTs
module 2
    src
    test/UTs
module FT
    tests/FTs

For FT, we have test suites. Now, how can I create a TestNG suite that has all the unit tests and can be executed at the comfort of a right click, just like the FT suite? It should not include FT component. I tried creating but saw that other modules tests are not called.

xploreraj
  • 3,792
  • 12
  • 33
  • 51
  • 2
    A Unit tests is located in the module it belongs to ...and there shouldn't be any suites to run from outside everytime you build those tests will be run by default using Maven (test phase). If we are talking about a integration tests that's a different story..But than you should move those integration tests to a separate module and run them within this module... – khmarbaise Jun 20 '17 at 11:07
  • Yes, agree. But my manager insists on getting a suite done to run all UTs with right click, not maven command. Also, one more benefit is that if we have a suite then a common TestNG report will get generated which will be having results from all modules in the app in a single file. – xploreraj Jun 21 '17 at 03:16
  • Sorry but your manager does no know anything about Maven and how `Convention over Configuration` works. Furthermore if you have a common report you can't see from which module the appropriate tests is or not. And usually you are working on a single module and changing it than you run the ut from the IDE via click or singly "ctrl-F11" in Eclipse etc. Running all ut is a job for a CI solution like jenkins etc. – khmarbaise Jun 21 '17 at 06:21

0 Answers0