IntelliJ IDEA TestNG include and exclude groups

This posts explains test filtering of TestNG tests in IntelliJ IDEA by including and excluding groups.

Please follow the steps as given below to create configuration to run multiple tests in your project / module:


  1. Click Run menu
  2. Select Edit Configurations..
  3. Click + icon (Add New Configuration)
  4. Select TestNG
  5. Set Name as Groups
  6. Change Test Kind: to Pattern
  7. Set Pattern: to com.harishkannarao.* (your project's root package)
  8. Set Test runner params: as -groups "API_INTEGRATION_TEST,WEB_INTEGRATION_TEST" -excludegroups "AUTH_API_INTEGRATION_TEST"
  9. Click OK


Running the configuration:

  1. Click Run menu
  2. Select Run...
  3. Select Groups




Comments

Popular posts from this blog

JSON with curl and jq

Import self signed in Linux for Chrome / Chromium headless testing

Colima - Drop In replacement for Docker Desktop for Mac and Linux