TestNGConfiguration (final Project project) { final RunManager manager = RunManager.getInstance(project); RunnerAndConfigurationSettings settings = manager.createConfiguration("testt", TestNGConfigurationType.class); manager.addConfiguration(settings); return (TestNGConfiguration)settings.getConfiguration(); }