To run them together there are few options available but I have chosen using different profiles for Junit and TestNG. But now problem is with excluding and including test c
The configuration for the compiler plugin excludes the TestNG types. The configuration from the profile is merged with the default configuration, so your effective compiler configuration is:
This means that your TestNG types aren't ever compiled and therefore aren't run.
If you specify the section in the testNG profile it will override the default excludes and your TestNG types will be compiled and run. I can't remember if it will work with an empty excludes tag (i.e. ), you may have to specify something like this to ensure the default configuration is overridden.