Run unit tests in IntelliJ IDEA from multiple modules together

前端 未结 6 1960
忘掉有多难
忘掉有多难 2021-01-29 23:56

How can I run all tests from two or more IDEA modules at once?

I\'m using many modules and it is important to run all of the unit tests often and when I choose more tha

6条回答
  •  后悔当初
    2021-01-30 00:21

    Select all modules, right-click them and choose to run all tests. This will create a configuration called "Whole Project" which you can run again at any time.

    I found this better than the accepted answer because this runs the unit tests separately for each module. If your test cases use module-specific resources during its run-time then the accepted answer's best way won't work.

    Select all modules

    Select all modules

    Right click and choose to run all tests

    Right click and choose to run all tests

    Get a new run configuration

    Get a new run configuration

提交回复
热议问题