@Override void configure(Task task) { super.configure(task); Task prepareMonitorEnvTask = project.getTasks().findByName(AzurePlugin.PREPARE_MONITOR_ENV_TASK); Test t = (Test)task; t.setDescription("Test execution of the azureTest source set against production deployment."); t.dependsOn(prepareMonitorEnvTask); t.setClasspath(sourceSet.getRuntimeClasspath()); t.setTestClassesDirs(sourceSet.getOutput().getClassesDirs()); t.systemProperty("testEnvPath", azure.getMonitorEnvFile().get().getAsFile().getAbsolutePath()); t.setBinResultsDir(new File(project.getBuildDir(), "monitor-test-results/binary/test")); t.getReports().getHtml().setDestination(new File(project.getBuildDir(), "reports/monitor-test-results" )); t.getReports().getJunitXml().setDestination(new File(project.getBuildDir(), "monitor-test-results" )); } }
@Override void configure(Task task) { super.configure(task); Task prepareTestEnvTask = project.getTasks().findByName(AzurePlugin.PREPARE_TEST_ENV_TASK); Task cleanupTestEnvTask = project.getTasks().findByName(AzurePlugin.CLEANUP_TEST_ENV_TASK); Task triggerTestCleanUpTask = project.getTasks().findByName(AzurePlugin.TRIGGER_CLEAN_TEST_ENV); Test t = (Test)task; t.setDescription("Test execution of the azureTest source set."); t.dependsOn(prepareTestEnvTask, triggerTestCleanUpTask); t.finalizedBy(cleanupTestEnvTask); t.setClasspath(sourceSet.getRuntimeClasspath()); t.setTestClassesDirs(sourceSet.getOutput().getClassesDirs()); t.systemProperty("testEnvPath", azure.getTestEnvFile().get().getAsFile().getAbsolutePath()); } }
Test.class); runTestsTask.setGroup(JavaBasePlugin.VERIFICATION_GROUP); runTestsTask.setDescription( "Run unit tests for the " + testedVariantData.getVariantConfiguration().getFullName() + " build.");