]> source.dussan.org Git - sonarqube.git/commitdiff
Fix deprecated calls to SonarRunner in tests
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 4 Jul 2016 11:49:28 +0000 (13:49 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 6 Jul 2016 13:56:31 +0000 (15:56 +0200)
47 files changed:
it/it-tests/src/test/java/it/analysis/BatchTest.java
it/it-tests/src/test/java/it/analysis/IssueJsonReportTest.java
it/it-tests/src/test/java/it/analysis/IssuesModeTest.java
it/it-tests/src/test/java/it/analysis/LinksTest.java
it/it-tests/src/test/java/it/analysis/MultiLanguageTest.java
it/it-tests/src/test/java/it/analysis/ProjectProvisioningTest.java
it/it-tests/src/test/java/it/analysis/ReportDumpTest.java
it/it-tests/src/test/java/it/analysis/SettingsEncryptionTest.java
it/it-tests/src/test/java/it/analysis/TempFolderTest.java
it/it-tests/src/test/java/it/analysisExclusion/FileExclusionsTest.java
it/it-tests/src/test/java/it/analysisExclusion/IssueExclusionsTest.java
it/it-tests/src/test/java/it/authorisation/IssuePermissionTest.java
it/it-tests/src/test/java/it/authorisation/PermissionSearchTest.java
it/it-tests/src/test/java/it/ce/CeWsTest.java
it/it-tests/src/test/java/it/component/ComponentsWsTest.java
it/it-tests/src/test/java/it/component/ProjectSearchTest.java
it/it-tests/src/test/java/it/componentSearch/AllProjectsTest.java
it/it-tests/src/test/java/it/customMeasure/CustomMeasuresTest.java
it/it-tests/src/test/java/it/duplication/CrossModuleDuplicationsTest.java
it/it-tests/src/test/java/it/i18n/I18nTest.java
it/it-tests/src/test/java/it/issue/NewIssuesMeasureTest.java
it/it-tests/src/test/java/it/measure/MeasuresWsTest.java
it/it-tests/src/test/java/it/measure/ProjectOverviewTest.java
it/it-tests/src/test/java/it/measure/ProjectWidgetsTest.java
it/it-tests/src/test/java/it/measureFilter/MeasureFiltersTest.java
it/it-tests/src/test/java/it/measureHistory/HistoryUiTest.java
it/it-tests/src/test/java/it/measureHistory/SincePreviousVersionHistoryTest.java
it/it-tests/src/test/java/it/measureHistory/TimeMachineTest.java
it/it-tests/src/test/java/it/projectAdministration/BackgroundTasksTest.java
it/it-tests/src/test/java/it/projectAdministration/BulkDeletionTest.java
it/it-tests/src/test/java/it/projectAdministration/ProjectPermissionsTest.java
it/it-tests/src/test/java/it/projectComparison/ProjectComparisonTest.java
it/it-tests/src/test/java/it/qualityGate/QualityGateNotificationTest.java
it/it-tests/src/test/java/it/qualityGate/QualityGateUiTest.java
it/it-tests/src/test/java/it/qualityModel/MaintainabilityRatingMeasureTest.java
it/it-tests/src/test/java/it/qualityModel/TechnicalDebtInIssueChangelogTest.java
it/it-tests/src/test/java/it/qualityModel/TechnicalDebtTest.java
it/it-tests/src/test/java/it/qualityModel/TechnicalDebtWidgetTest.java
it/it-tests/src/test/java/it/serverSystem/ServerSystemTest.java
it/it-tests/src/test/java/it/settings/SettingsTestRestartingOrchestrator.java
it/it-tests/src/test/java/it/settings/SubCategoriesTest.java
it/it-tests/src/test/java/it/test/CoverageTest.java
it/it-tests/src/test/java/it/test/CoverageTrackingTest.java
it/it-tests/src/test/java/it/test/NewCoverageTest.java
it/it-tests/src/test/java/it/test/TestExecutionTest.java
it/it-tests/src/test/java/it/user/FavouriteTest.java
it/it-tests/src/test/java/it/user/LocalAuthenticationTest.java

index 57d5084f8a9a23cab5b914bab5c85c60d653c285..006fdca305b99fa0b060fa817381bd391434fd95 100644 (file)
@@ -21,7 +21,7 @@ package it.analysis;
 
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category3Suite;
 import java.io.File;
@@ -199,7 +199,7 @@ public class BatchTest {
     orchestrator.getServer().provisionProject("sample", "xoo-sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
-    SonarRunner runner = configureRunner("shared/xoo-sample",
+    SonarScanner runner = configureScanner("shared/xoo-sample",
       "sonar.verbose", "true");
     runner.setEnvironmentVariable("SONAR_USER_HOME", "/dev/null");
     BuildResult buildResult = orchestrator.executeBuildQuietly(runner);
@@ -443,7 +443,7 @@ public class BatchTest {
     long before = new Date().getTime() - 2000l;
     orchestrator.getServer().provisionProject("sample", "xoo-sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
-    orchestrator.executeBuild(SonarRunner.create(ItUtils.projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(ItUtils.projectDir("shared/xoo-sample")));
     long after = new Date().getTime() + 2000l;
     Resource xooSample = orchestrator.getServer().getWsClient().find(new ResourceQuery().setResourceKeyOrId("sample"));
     assertThat(xooSample.getCreationDate().getTime()).isGreaterThan(before).isLessThan(after);
@@ -457,7 +457,7 @@ public class BatchTest {
   public void fail_if_project_date_is_older_than_latest_snapshot() {
     orchestrator.getServer().provisionProject("sample", "xoo-sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
-    SonarRunner analysis = SonarRunner.create(ItUtils.projectDir("shared/xoo-sample"));
+    SonarScanner analysis = SonarScanner.create(ItUtils.projectDir("shared/xoo-sample"));
     analysis.setProperty("sonar.projectDate", "2014-01-01");
     orchestrator.executeBuild(analysis);
 
@@ -475,19 +475,19 @@ public class BatchTest {
   }
 
   private BuildResult scan(String projectPath, String... props) {
-    SonarRunner runner = configureRunner(projectPath, props);
+    SonarScanner runner = configureScanner(projectPath, props);
     return orchestrator.executeBuild(runner);
   }
 
   private BuildResult scanQuietly(String projectPath, String... props) {
-    SonarRunner runner = configureRunner(projectPath, props);
+    SonarScanner runner = configureScanner(projectPath, props);
     return orchestrator.executeBuildQuietly(runner);
   }
 
-  private SonarRunner configureRunner(String projectPath, String... props) {
-    SonarRunner runner = SonarRunner.create(ItUtils.projectDir(projectPath))
+  private SonarScanner configureScanner(String projectPath, String... props) {
+    SonarScanner scanner = SonarScanner.create(ItUtils.projectDir(projectPath))
       .setProperties(props);
-    return runner;
+    return scanner;
   }
 
 }
index fe0f657ac3bbf3b2587be0032663778d029a0e3a..cca24d3ab0ec897e4b4645e6688c6fb395b81810 100644 (file)
@@ -21,7 +21,7 @@ package it.analysis;
 
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import com.sonar.orchestrator.locator.ResourceLocation;
 import it.Category3Suite;
@@ -67,7 +67,7 @@ public class IssueJsonReportTest {
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
     File projectDir = ItUtils.projectDir("shared/xoo-sample");
-    SonarRunner runner = SonarRunner.create(projectDir,
+    SonarScanner runner = SonarScanner.create(projectDir,
       "sonar.analysis.mode", "issues",
       "sonar.verbose", "true",
       "sonar.report.export.path", "sonar-report.json");
@@ -101,7 +101,7 @@ public class IssueJsonReportTest {
     orchestrator.getServer().associateProjectToQualityProfile("sample-multiline", "xoo", "multiline");
 
     File projectDir = ItUtils.projectDir("shared/xoo-precise-issues");
-    SonarRunner runner = SonarRunner.create(projectDir,
+    SonarScanner runner = SonarScanner.create(projectDir,
       "sonar.analysis.mode", "issues",
       "sonar.verbose", "true",
       "sonar.report.export.path", "sonar-report.json");
@@ -135,7 +135,7 @@ public class IssueJsonReportTest {
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
     File projectDir = ItUtils.projectDir("analysis/tracking/v1");
-    SonarRunner issuesModeScan = SonarRunner.create(projectDir)
+    SonarScanner issuesModeScan = SonarScanner.create(projectDir)
       .setProperty("sonar.analysis.mode", "issues")
       .setProperty("sonar.userHome", temp.newFolder().getAbsolutePath())
       .setProperty("sonar.report.export.path", "sonar-report.json")
@@ -156,13 +156,13 @@ public class IssueJsonReportTest {
     orchestrator.getServer().provisionProject("sample", "tracking");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
-    SonarRunner scan = SonarRunner.create(ItUtils.projectDir("analysis/tracking/v1"))
+    SonarScanner scan = SonarScanner.create(ItUtils.projectDir("analysis/tracking/v1"))
       .setProperty("sonar.projectDate", "2013-05-01");
     orchestrator.executeBuild(scan);
 
     // Issues mode scan -> 2 new issues and 13 existing issues
     File projectDir = ItUtils.projectDir("analysis/tracking/v2");
-    SonarRunner issuesModeScan = SonarRunner.create(projectDir)
+    SonarScanner issuesModeScan = SonarScanner.create(projectDir)
       .setProperty("sonar.analysis.mode", "issues")
       .setProperty("sonar.userHome", temp.newFolder().getAbsolutePath())
       .setProperty("sonar.report.export.path", "sonar-report.json")
@@ -183,14 +183,14 @@ public class IssueJsonReportTest {
     orchestrator.getServer().provisionProject("sample:mybranch", "Sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample:mybranch", "xoo", "one-issue-per-line");
 
-    SonarRunner scan = SonarRunner.create(ItUtils.projectDir("analysis/tracking/v1"))
+    SonarScanner scan = SonarScanner.create(ItUtils.projectDir("analysis/tracking/v1"))
       .setProperty("sonar.projectDate", "2013-05-01")
       .setProperty("sonar.branch", "mybranch");
     orchestrator.executeBuild(scan);
 
     // issues mode scan -> 2 new issues and 13 existing issues
     File projectDir = ItUtils.projectDir("analysis/tracking/v2");
-    SonarRunner issuesModeScan = SonarRunner.create(projectDir)
+    SonarScanner issuesModeScan = SonarScanner.create(projectDir)
       .setProperty("sonar.analysis.mode", "issues")
       .setProperty("sonar.userHome", temp.newFolder().getAbsolutePath())
       .setProperty("sonar.report.export.path", "sonar-report.json")
@@ -218,13 +218,13 @@ public class IssueJsonReportTest {
     orchestrator.getServer().associateProjectToQualityProfile("com.sonarsource.it.samples:multi-modules-sample", "xoo", "one-issue-per-line");
 
     File rootDir = ItUtils.projectDir("shared/xoo-multi-modules-sample");
-    SonarRunner scan = SonarRunner.create(rootDir)
+    SonarScanner scan = SonarScanner.create(rootDir)
       .setProperty("sonar.projectDate", "2013-05-01");
     orchestrator.executeBuild(scan);
 
     // Issues mode scan on a module -> no new issues
     File moduleDir = ItUtils.projectDir("shared/xoo-multi-modules-sample/module_a/module_a1");
-    SonarRunner issuesModeScan = SonarRunner.create(moduleDir)
+    SonarScanner issuesModeScan = SonarScanner.create(moduleDir)
       .setProperty("sonar.projectKey", "com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1")
       .setProperty("sonar.projectVersion", "1.0-SNAPSHOT")
       .setProperty("sonar.projectName", "ModuleA1")
@@ -255,12 +255,12 @@ public class IssueJsonReportTest {
     orchestrator.getServer().associateProjectToQualityProfile("com.sonarsource.it.samples:multi-modules-sample", "xoo", "one-issue-per-line");
 
     File rootDir = ItUtils.projectDir("shared/xoo-multi-modules-sample");
-    SonarRunner scan = SonarRunner.create(rootDir)
+    SonarScanner scan = SonarScanner.create(rootDir)
       .setProperty("sonar.projectDate", "2013-05-01");
     orchestrator.executeBuild(scan);
 
     // issues mode scan -> no new issues
-    SonarRunner issuesModeScan = SonarRunner.create(rootDir)
+    SonarScanner issuesModeScan = SonarScanner.create(rootDir)
       .setProperty("sonar.analysis.mode", "issues")
       .setProperty("sonar.userHome", temp.newFolder().getAbsolutePath())
       .setProperty("sonar.report.export.path", "sonar-report.json")
index 5817eed3030855967730a2693c153c7dc4ae3205..8b1e7bd799b98c19fa4432c8c724068fe10e71dc 100644 (file)
@@ -23,7 +23,6 @@ import com.google.common.collect.Maps;
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildFailureException;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
 import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.build.SonarScannerInstaller;
 import com.sonar.orchestrator.config.FileSystem;
@@ -86,7 +85,7 @@ public class IssuesModeTest {
     restoreProfile("one-issue-per-line.xml");
     orchestrator.getServer().provisionProject("sample", "xoo-sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
-    SonarRunner runner = configureRunnerIssues("shared/xoo-sample", null, "sonar.verbose", "true");
+    SonarScanner runner = configureRunnerIssues("shared/xoo-sample", null, "sonar.verbose", "true");
     BuildResult result = orchestrator.executeBuild(runner);
     assertThat(ItUtils.countIssuesInJsonReport(result, true)).isEqualTo(17);
   }
@@ -96,7 +95,7 @@ public class IssuesModeTest {
     restoreProfile("one-issue-per-line.xml");
     orchestrator.getServer().provisionProject("sample", "xoo-sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
-    SonarRunner runner = configureRunner("shared/xoo-sample");
+    SonarScanner runner = configureRunner("shared/xoo-sample");
     runner.setProperty("sonar.analysis.mode", "incremental");
 
     thrown.expect(BuildFailureException.class);
@@ -110,7 +109,7 @@ public class IssuesModeTest {
     restoreProfile("one-issue-per-line.xml");
     setDefaultQualityProfile("xoo", "one-issue-per-line");
 
-    SonarRunner runner = configureRunner("shared/xoo-sample");
+    SonarScanner runner = configureRunner("shared/xoo-sample");
     runner.setProjectKey("sample/project");
     runner.setProperty("sonar.analysis.mode", "issues");
     BuildResult result = orchestrator.executeBuild(runner);
@@ -124,7 +123,7 @@ public class IssuesModeTest {
     orchestrator.getServer().provisionProject("sample", "xoo-sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
-    SonarRunner runner = configureRunner("shared/xoo-sample", "sonar.verbose", "true");
+    SonarScanner runner = configureRunner("shared/xoo-sample", "sonar.verbose", "true");
     BuildResult result = orchestrator.executeBuild(runner);
     List<Issue> serverIssues = ItUtils.getAllServerIssues(orchestrator);
     for (Issue i : serverIssues) {
@@ -152,7 +151,7 @@ public class IssuesModeTest {
     orchestrator.getServer().provisionProject("sample", "xoo-sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
-    SonarRunner runner = configureRunner("shared/xoo-sample", "sonar.verbose", "true");
+    SonarScanner runner = configureRunner("shared/xoo-sample", "sonar.verbose", "true");
     BuildResult result = orchestrator.executeBuild(runner);
     List<Issue> serverIssues = ItUtils.getAllServerIssues(orchestrator);
     for (Issue i : serverIssues) {
@@ -181,7 +180,7 @@ public class IssuesModeTest {
     orchestrator.getServer().provisionProject("sample", "xoo-sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
-    SonarRunner runner = configureRunner("shared/xoo-sample", "sonar.verbose", "true");
+    SonarScanner runner = configureRunner("shared/xoo-sample", "sonar.verbose", "true");
     BuildResult result = orchestrator.executeBuild(runner);
 
     // change QP
@@ -195,7 +194,7 @@ public class IssuesModeTest {
     FileUtils.write(srcFile, "\n", StandardCharsets.UTF_8, true);
 
     // scan again, with different QP
-    runner = SonarRunner.create(tmpProjectDir,
+    runner = SonarScanner.create(tmpProjectDir,
       "sonar.working.directory", temp.newFolder().getAbsolutePath(),
       "sonar.analysis.mode", "issues",
       "sonar.report.export.path", "sonar-report.json",
@@ -215,7 +214,7 @@ public class IssuesModeTest {
     orchestrator.getServer().provisionProject("sample", "xoo-sample-with-spaces");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "with-many-rules");
 
-    SonarRunner runner = configureRunner("analysis/xoo-sample-with-spaces/v2");
+    SonarScanner runner = configureRunner("analysis/xoo-sample-with-spaces/v2");
     BuildResult result = orchestrator.executeBuild(runner);
     assertThat(getResource("sample:my sources/main/xoo/sample/My Sample.xoo")).isNotNull();
 
@@ -235,7 +234,7 @@ public class IssuesModeTest {
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "with-many-rules");
 
     // First real scan with source
-    SonarRunner runner = configureRunner("shared/xoo-history-v2");
+    SonarScanner runner = configureRunner("shared/xoo-history-v2");
     BuildResult result = orchestrator.executeBuild(runner);
     assertThat(getResource("sample:src/main/xoo/sample/ClassAdded.xoo")).isNotNull();
 
@@ -256,7 +255,7 @@ public class IssuesModeTest {
   @Test
   public void should_fail_if_plugin_access_secured_properties() throws IOException {
     // Test access from task (ie BatchSettings)
-    SonarRunner runner = configureRunnerIssues("shared/xoo-sample", null,
+    SonarScanner runner = configureRunnerIssues("shared/xoo-sample", null,
       "accessSecuredFromTask", "true");
     BuildResult result = orchestrator.executeBuildQuietly(runner);
 
@@ -278,7 +277,7 @@ public class IssuesModeTest {
     File homeDir = runFirstAnalysisAndFlagIssueAsWontFix();
 
     // Second issues mode using same cache dir but cache disabled by default
-    SonarRunner runner = configureRunnerIssues("shared/xoo-sample", homeDir);
+    SonarScanner runner = configureRunnerIssues("shared/xoo-sample", homeDir);
     BuildResult result = orchestrator.executeBuild(runner);
 
     // False positive is not returned
@@ -291,7 +290,7 @@ public class IssuesModeTest {
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
     // First run (publish mode)
-    SonarRunner runner = configureRunner("shared/xoo-sample");
+    SonarScanner runner = configureRunner("shared/xoo-sample");
     orchestrator.executeBuild(runner);
 
     // First issues mode
@@ -317,7 +316,7 @@ public class IssuesModeTest {
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
     // First run (publish mode)
-    SonarRunner runner = configureRunner("shared/xoo-sample");
+    SonarScanner runner = configureRunner("shared/xoo-sample");
     orchestrator.executeBuild(runner);
 
     SonarClient client = orchestrator.getServer().adminWsClient();
@@ -367,7 +366,7 @@ public class IssuesModeTest {
 
     // use same working dir, because lock file is in it
     String workDirPath = temp.newFolder().getAbsolutePath();
-    SonarRunner runner = configureRunner("shared/xoo-sample",
+    SonarScanner runner = configureRunner("shared/xoo-sample",
       "sonar.working.directory", workDirPath);
 
     orchestrator.executeBuild(runner);
@@ -436,8 +435,8 @@ public class IssuesModeTest {
     return scanner;
   }
 
-  private SonarRunner configureRunner(String projectDir, String... props) throws IOException {
-    SonarRunner runner = SonarRunner.create(ItUtils.projectDir(projectDir),
+  private SonarScanner configureRunner(String projectDir, String... props) throws IOException {
+    SonarScanner runner = SonarScanner.create(ItUtils.projectDir(projectDir),
       "sonar.working.directory", temp.newFolder().getAbsolutePath(),
       "sonar.report.export.path", "sonar-report.json",
       "sonar.userHome", temp.newFolder().getAbsolutePath());
index 4a84614ae48eaac5571e85c31b02a557ddf2b004..adcd89ce550f135c10dffc239ba0720c19f5bd8c 100644 (file)
@@ -22,7 +22,7 @@ package it.analysis;
 import com.google.common.collect.Lists;
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.MavenBuild;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.db.Database;
 import it.Category3Suite;
 import java.util.Collection;
@@ -64,7 +64,7 @@ public class LinksTest {
    */
   @Test
   public void shouldUseLinkProperties() {
-    SonarRunner runner = SonarRunner.create(ItUtils.projectDir("analysis/links-project"))
+    SonarScanner runner = SonarScanner.create(ItUtils.projectDir("analysis/links-project"))
       .setProperty("sonar.scm.disabled", "true");
     orchestrator.executeBuild(runner);
 
index 4d2f0d34836dad4e0416c4bfa85a5ca8d94e06a9..9442fc8ab699fc325a10f0de4395e7e33161419d 100644 (file)
@@ -21,7 +21,7 @@ package it.analysis;
 
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category3Suite;
 import org.junit.After;
@@ -57,7 +57,7 @@ public class MultiLanguageTest {
     orchestrator.getServer().associateProjectToQualityProfile("multi-language-sample", "xoo", "one-issue-per-line");
     orchestrator.getServer().associateProjectToQualityProfile("multi-language-sample","xoo2", "one-issue-per-line-xoo2");
 
-    SonarRunner build = SonarRunner.create().setProjectDir(ItUtils.projectDir("analysis/xoo-multi-languages"));
+    SonarScanner build = SonarScanner.create().setProjectDir(ItUtils.projectDir("analysis/xoo-multi-languages"));
     BuildResult result = orchestrator.executeBuild(build);
 
     assertThat(result.getLogs()).contains("2 files indexed");
index 8fd84acf8421e1f930f8f7fbca977180ce731755..21fdf4e9a60b47f19a8c5cd649a9a9df798559d7 100644 (file)
@@ -21,7 +21,7 @@ package it.analysis;
 
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category3Suite;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -46,7 +46,7 @@ public class ProjectProvisioningTest {
   public static void init() {
     orchestrator.resetData();
     orchestrator.executeBuild(
-      SonarRunner.create(ItUtils.projectDir("shared/xoo-sample"))
+      SonarScanner.create(ItUtils.projectDir("shared/xoo-sample"))
       );
   }
 
@@ -154,7 +154,7 @@ public class ProjectProvisioningTest {
 
   private static BuildResult scan(String projectPath, String... propertiesKeyValues) {
     return orchestrator.executeBuildQuietly(
-      SonarRunner.create(ItUtils.projectDir(projectPath)).setProperties(propertiesKeyValues));
+      SonarScanner.create(ItUtils.projectDir(projectPath)).setProperties(propertiesKeyValues));
   }
 
   private static void setProperty(String key, String value) {
index b12ed30ca54ff8bca47171d98237475bea2715e6..1000dc18c889e87ed40fce6141e954ad3bac25d8 100644 (file)
@@ -20,7 +20,7 @@
 package it.analysis;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.squareup.okhttp.HttpUrl;
 import com.squareup.okhttp.OkHttpClient;
 import com.squareup.okhttp.Request;
@@ -50,7 +50,7 @@ public class ReportDumpTest {
   @Test
   public void dump_metadata_of_uploaded_report() throws Exception {
     File projectDir = ItUtils.projectDir("shared/xoo-sample");
-    orchestrator.executeBuild(SonarRunner.create(projectDir, "sonar.projectKey", "dump_metadata_of_uploaded_report", "sonar.projectName", "dump_metadata_of_uploaded_report"));
+    orchestrator.executeBuild(SonarScanner.create(projectDir, "sonar.projectKey", "dump_metadata_of_uploaded_report", "sonar.projectName", "dump_metadata_of_uploaded_report"));
 
     File metadata = new File(projectDir, ".sonar/report-task.txt");
     assertThat(metadata).exists().isFile();
index 48a594e5d898d8001781e368a67587263df1b248..f994212ec7e60edeaa36d3b828cc30a973cffef4 100644 (file)
@@ -22,7 +22,7 @@ package it.analysis;
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildFailureException;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category3Suite;
 import java.io.File;
 import java.net.URL;
@@ -46,7 +46,7 @@ public class SettingsEncryptionTest {
    */
   @Test
   public void testEncryptedProperty() throws Exception {
-    SonarRunner build = SonarRunner.create(ItUtils.projectDir("shared/xoo-sample"))
+    SonarScanner build = SonarScanner.create(ItUtils.projectDir("shared/xoo-sample"))
       .setProperty("sonar.secretKeyPath", pathToValidSecretKey())
       .setProperty("sonar.login", "admin")
       // wrong password
@@ -57,7 +57,7 @@ public class SettingsEncryptionTest {
     assertThat(result.getStatus()).isNotEqualTo(0);
     assertThat(result.getLogs()).contains("Fail to decrypt the property sonar.password. Please check your secret key");
 
-    build = SonarRunner.create(ItUtils.projectDir("shared/xoo-sample"))
+    build = SonarScanner.create(ItUtils.projectDir("shared/xoo-sample"))
       .setProperty("sonar.secretKeyPath", pathToValidSecretKey())
       // "admin" encrypted with the above secret key
       .setProperty("sonar.login", "{aes}evRHXHsEyPr5RjEuxUJcHA==")
@@ -74,7 +74,7 @@ public class SettingsEncryptionTest {
   @Test(expected = BuildFailureException.class)
   public void failIfEncryptedPropertyButNoSecretKey() throws Exception {
     // path to secret key is missing
-    SonarRunner build = SonarRunner.create(ItUtils.projectDir("shared/xoo-sample"))
+    SonarScanner build = SonarScanner.create(ItUtils.projectDir("shared/xoo-sample"))
       .setProperty("encryptedProperty", "{aes}9mx5Zq4JVyjeChTcVjEide4kWCwusFl7P2dSVXtg9IY=");
     orchestrator.executeBuild(build);
   }
index 8d58c1ff4e3d73bc38ffa928b3fa9c32f7fbbdfa..52289594b0586b23e02a6afe05ac9268aadc5c97 100644 (file)
@@ -21,7 +21,7 @@ package it.analysis;
 
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category3Suite;
 import java.io.File;
@@ -83,7 +83,7 @@ public class TempFolderTest {
       File tmp = temp.newFolder();
       assertThat(tmp.list()).isEmpty();
 
-      SonarRunner runner = configureRunner()
+      SonarScanner runner = configureScanner()
         .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Djava.io.tmpdir=" + tmp.getAbsolutePath());
       orchestrator.executeBuild(runner);
 
@@ -96,12 +96,12 @@ public class TempFolderTest {
   }
 
   private BuildResult scan(String... props) {
-    SonarRunner runner = configureRunner(props);
+    SonarScanner runner = configureScanner(props);
     return orchestrator.executeBuild(runner);
   }
 
-  private SonarRunner configureRunner(String... props) {
-    return SonarRunner.create(ItUtils.projectDir("shared/xoo-sample"))
+  private SonarScanner configureScanner(String... props) {
+    return SonarScanner.create(ItUtils.projectDir("shared/xoo-sample"))
       .setProperties(props);
   }
 
index 8b77aa168a93f1467cedb06366eb44577b874adc..4612bad12a28aea290d5ceab13884d115122f45c 100644 (file)
@@ -20,7 +20,7 @@
 package it.analysisExclusion;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category4Suite;
 import java.util.List;
 import org.junit.Before;
@@ -134,7 +134,7 @@ public class FileExclusionsTest {
   }
 
   private void scan(String... properties) {
-    SonarRunner build = SonarRunner
+    SonarScanner build = SonarScanner
       .create(ItUtils.projectDir("exclusions/exclusions"))
       .setProperties(properties);
     orchestrator.executeBuild(build);
index 7cb51d18b6a21b29235d3077fa922fd7257a5430..408ad2a2d1820187eac333d248df8c88087b731d 100644 (file)
@@ -21,7 +21,7 @@ package it.analysisExclusion;
 
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category4Suite;
 import org.junit.Before;
@@ -238,7 +238,7 @@ public class IssueExclusionsTest {
       "Sonar :: Integration Tests :: Multi-modules With Exclusions");
     orchestrator.getServer().associateProjectToQualityProfile("com.sonarsource.it.samples:multi-modules-exclusions", "xoo", "with-many-rules");
 
-    SonarRunner scan = SonarRunner.create(ItUtils.projectDir(PROJECT_DIR))
+    SonarScanner scan = SonarScanner.create(ItUtils.projectDir(PROJECT_DIR))
       .setProperties("sonar.cpd.skip", "true")
       .setProperties(properties)
       .setProperties("sonar.verbose", "true");
index 2c1a857c594e4c4efdeeded7b326cf68345b9404..87b1631a6575666fff9298a4adfc7bbe143cb7c6 100644 (file)
@@ -20,7 +20,7 @@
 package it.authorisation;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category1Suite;
 import org.junit.Before;
@@ -59,12 +59,12 @@ public class IssuePermissionTest {
 
     orchestrator.getServer().provisionProject("sample", "Sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
-    SonarRunner sampleProject = SonarRunner.create(projectDir("shared/xoo-sample"));
+    SonarScanner sampleProject = SonarScanner.create(projectDir("shared/xoo-sample"));
     orchestrator.executeBuild(sampleProject);
 
     orchestrator.getServer().provisionProject("sample2", "Sample2");
     orchestrator.getServer().associateProjectToQualityProfile("sample2", "xoo", "one-issue-per-line");
-    SonarRunner sampleProject2 = SonarRunner.create(projectDir("shared/xoo-sample"))
+    SonarScanner sampleProject2 = SonarScanner.create(projectDir("shared/xoo-sample"))
       .setProperty("sonar.projectKey", "sample2")
       .setProperty("sonar.projectName", "Sample2");
     orchestrator.executeBuild(sampleProject2);
index 0d7508a3ee1683836c01a8faa87b76f4a7a47033..bf9c454777b717e883374d9053967fca25b8f589 100644 (file)
@@ -20,7 +20,7 @@
 package it.authorisation;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category1Suite;
 import org.junit.AfterClass;
@@ -72,7 +72,7 @@ public class PermissionSearchTest {
 
     orchestrator.getServer().provisionProject(PROJECT_KEY, "Sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
-    SonarRunner sampleProject = SonarRunner.create(projectDir("shared/xoo-sample"));
+    SonarScanner sampleProject = SonarScanner.create(projectDir("shared/xoo-sample"));
     orchestrator.executeBuild(sampleProject);
 
     adminWsClient = newAdminWsClient(orchestrator);
index 98fd04a1a387ffa913c5e527fdd464eb69e9e68e..717d0f2b72573bc25a4bf87468834705c422a626 100644 (file)
@@ -21,7 +21,7 @@
 package it.ce;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category4Suite;
 import org.junit.Before;
 import org.junit.ClassRule;
@@ -46,7 +46,7 @@ public class CeWsTest {
   @Before
   public void inspectProject() {
     orchestrator.resetData();
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     wsClient = ItUtils.newAdminWsClient(orchestrator);
   }
index a4cac2e039affaa802461b336162a8f535e856ee..4f8593d264690e339e67c224a43c5195045244f8 100644 (file)
@@ -20,7 +20,7 @@
 package it.component;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category4Suite;
 import org.junit.Before;
 import org.junit.ClassRule;
@@ -44,7 +44,7 @@ public class ComponentsWsTest {
   @Before
   public void inspectProject() {
     orchestrator.resetData();
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     wsClient = ItUtils.newAdminWsClient(orchestrator);
   }
index 01827629ba1e3abe4ed27bd6c3aff44d4fb2a624..204952655d0b0c93405d22cb50110a632dd70b41 100644 (file)
  */
 package it.component;
 
-import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.projectDir;
-
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category4Suite;
 import java.io.IOException;
 import org.apache.commons.io.IOUtils;
@@ -38,6 +35,9 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import util.QaOnly;
 
+import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.projectDir;
+
 @Category(QaOnly.class)
 public class ProjectSearchTest {
 
@@ -47,7 +47,7 @@ public class ProjectSearchTest {
   @Before
   public void inspectProject() {
     orchestrator.resetData();
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
   }
 
   /**
@@ -55,7 +55,7 @@ public class ProjectSearchTest {
    */
   @Test
   public void projects_web_service() throws IOException {
-    SonarRunner build = SonarRunner.create(projectDir("shared/xoo-sample"));
+    SonarScanner build = SonarScanner.create(projectDir("shared/xoo-sample"));
     orchestrator.executeBuild(build);
 
     String url = orchestrator.getServer().getUrl() + "/api/projects/index?key=sample&versions=true";
index b9038e12626729f2fba9d6f320847813b90ded33..0eed7d0464723d3673210d1f6325861e74b15830 100644 (file)
@@ -20,7 +20,7 @@
 package it.componentSearch;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category4Suite;
 import org.junit.BeforeClass;
@@ -41,7 +41,7 @@ public class AllProjectsTest {
   @BeforeClass
   public static void inspectProject() {
     orchestrator.executeBuild(
-      SonarRunner.create(projectDir("shared/xoo-sample"))
+      SonarScanner.create(projectDir("shared/xoo-sample"))
         .setProjectKey("all-project-test-project")
         .setProjectName("AllProjectsTest Project")
     );
index 275cf495ad9ed7c74cb35c7e7f8f16ac0f9c2e09..907290ce25dc2f04a3295edcc8118462449c1961 100644 (file)
@@ -20,7 +20,7 @@
 package it.customMeasure;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category1Suite;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -88,7 +88,7 @@ public class CustomMeasuresTest {
   }
 
   private void analyzeProject() {
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
   }
 
   private void setTeamSize(int i) {
index c96b3333ca9fa6a8f5d69e6660189db9a0c74f7b..30ecf4ee641484a6a8a1790510c69d6419a30db6 100644 (file)
@@ -21,7 +21,7 @@ package it.duplication;
 
 import com.google.common.collect.ImmutableMap;
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category4Suite;
 import org.apache.commons.io.FileUtils;
@@ -121,19 +121,19 @@ public class CrossModuleDuplicationsTest {
     verifyDuplicationMeasures(PROJECT_KEY + ":module2", 0, 0, 0, 0);
   }
 
-  private static SonarRunner analyzeProject(File projectDir, String projectKey, boolean create, String... additionalProperties) {
+  private static SonarScanner analyzeProject(File projectDir, String projectKey, boolean create, String... additionalProperties) {
     if (create) {
       orchestrator.getServer().provisionProject(projectKey, projectKey);
       orchestrator.getServer().associateProjectToQualityProfile(projectKey, "xoo", "xoo-duplication-profile");
     }
 
-    SonarRunner sonarRunner = SonarRunner.create(projectDir);
+    SonarScanner sonarRunner = SonarScanner.create(projectDir);
     ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
 
     for (int i = 0; i < additionalProperties.length; i += 2) {
       builder.put(additionalProperties[i], additionalProperties[i + 1]);
     }
-    SonarRunner scan = sonarRunner.setDebugLogs(true).setProperties(builder.build());
+    SonarScanner scan = sonarRunner.setDebugLogs(true).setProperties(builder.build());
     orchestrator.executeBuild(scan);
     return scan;
   }
index 793d78069dd37f03a04c58f4e3528f467377af23..837968b443feab421a7a897ce5b2582a7e5ebabe 100644 (file)
@@ -20,7 +20,7 @@
 package it.i18n;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import org.junit.Before;
@@ -52,7 +52,7 @@ public class I18nTest {
   @Test
   @Ignore
   public void test_localization() {
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("ui-i18n",
       "/i18n/default-locale-is-english.html",
index 6798fd27f421059eb140123d10f4a61d824f2d2e..39c4985a940de7f08463edb89d6f1c948caf417d 100644 (file)
@@ -19,7 +19,7 @@
  */
 package it.issue;
 
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import java.util.List;
 import org.junit.AfterClass;
@@ -64,12 +64,12 @@ public class NewIssuesMeasureTest extends AbstractIssueTest {
 
     // Execute an analysis in the past with no issue to have a past snapshot
     ORCHESTRATOR.getServer().associateProjectToQualityProfile("sample", "xoo", "empty");
-    ORCHESTRATOR.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")).setProperty("sonar.projectDate", "2013-01-01"));
+    ORCHESTRATOR.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")).setProperty("sonar.projectDate", "2013-01-01"));
 
     // Execute a analysis now with some issues
     ORCHESTRATOR.getServer().restoreProfile(FileLocation.ofClasspath("/issue/one-issue-per-line-profile.xml"));
     ORCHESTRATOR.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line-profile");
-    ORCHESTRATOR.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    ORCHESTRATOR.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     assertThat(ORCHESTRATOR.getServer().wsClient().issueClient().find(IssueQuery.create()).list()).isNotEmpty();
     Resource newIssues = ORCHESTRATOR.getServer().getWsClient()
@@ -79,7 +79,7 @@ public class NewIssuesMeasureTest extends AbstractIssueTest {
     assertThat(measures.get(0).getVariation2().intValue()).isEqualTo(17);
 
     // second analysis, with exactly the same profile -> no new issues
-    ORCHESTRATOR.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    ORCHESTRATOR.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     assertThat(ORCHESTRATOR.getServer().wsClient().issueClient().find(IssueQuery.create()).list()).isNotEmpty();
     newIssues = ORCHESTRATOR.getServer().getWsClient().find(ResourceQuery.createForMetrics("sample:src/main/xoo/sample/Sample.xoo", "new_violations").setIncludeTrends(true));
@@ -93,10 +93,10 @@ public class NewIssuesMeasureTest extends AbstractIssueTest {
     ORCHESTRATOR.getServer().restoreProfile(FileLocation.ofClasspath("/issue/one-issue-per-line-profile.xml"));
     ORCHESTRATOR.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line-profile");
 
-    ORCHESTRATOR.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample"))
+    ORCHESTRATOR.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample"))
       // Analyse a project in the past, with a date older than 30 last days (second period)
       .setProperty("sonar.projectDate", "2013-01-01"));
-    ORCHESTRATOR.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    ORCHESTRATOR.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     // new issues measures should be to 0 on project on 2 periods as new issues has been created
     Resource file = ORCHESTRATOR.getServer().getWsClient().find(ResourceQuery.createForMetrics("sample", "new_violations").setIncludeTrends(true));
@@ -117,10 +117,10 @@ public class NewIssuesMeasureTest extends AbstractIssueTest {
 
     // Execute an analysis in the past to have a past snapshot
     // version 1
-    ORCHESTRATOR.executeBuilds(SonarRunner.create(projectDir("shared/xoo-history-v1")));
+    ORCHESTRATOR.executeBuilds(SonarScanner.create(projectDir("shared/xoo-history-v1")));
 
     // version 2 with 2 new violations and 3 more ncloc
-    ORCHESTRATOR.executeBuilds(SonarRunner.create(projectDir("shared/xoo-history-v2")));
+    ORCHESTRATOR.executeBuilds(SonarScanner.create(projectDir("shared/xoo-history-v2")));
 
     assertThat(ORCHESTRATOR.getServer().wsClient().issueClient().find(IssueQuery.create()).list()).isNotEmpty();
     Resource file = ORCHESTRATOR.getServer().getWsClient().find(ResourceQuery.createForMetrics("sample", "new_violations", "violations", "ncloc").setIncludeTrends(true));
@@ -147,13 +147,13 @@ public class NewIssuesMeasureTest extends AbstractIssueTest {
     // First analysis without module b
     ORCHESTRATOR.getServer().restoreProfile(FileLocation.ofClasspath("/issue/NewIssuesMeasureTest/profile1.xml"));
     ORCHESTRATOR.getServer().associateProjectToQualityProfile("com.sonarsource.it.samples:multi-modules-sample", "xoo", "profile1");
-    ORCHESTRATOR.executeBuild(SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"))
+    ORCHESTRATOR.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample"))
       .setProperties("sonar.modules", "module_a"));
 
     // Second analysis with module b and with a new rule activated to have new issues on module a since last analysis
     ORCHESTRATOR.getServer().restoreProfile(FileLocation.ofClasspath("/issue/NewIssuesMeasureTest/profile2.xml"));
     ORCHESTRATOR.getServer().associateProjectToQualityProfile("com.sonarsource.it.samples:multi-modules-sample", "xoo", "profile2");
-    ORCHESTRATOR.executeBuild(SonarRunner.create(projectDir("shared/xoo-multi-modules-sample")));
+    ORCHESTRATOR.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample")));
 
     Resource project = ORCHESTRATOR.getServer().getWsClient()
       .find(ResourceQuery.createForMetrics("com.sonarsource.it.samples:multi-modules-sample", "new_violations", "violations").setIncludeTrends(true));
index 42f513aa79504e6c889c0cbc9a30a40a3f3b0564..038dd0294cddac85b0a35e9600f4a4b2d04e4d0a 100644 (file)
@@ -20,7 +20,7 @@
 package it.measure;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category1Suite;
 import java.util.List;
 import org.junit.AfterClass;
@@ -63,7 +63,7 @@ public class MeasuresWsTest {
   @Before
   public void inspectProject() {
     orchestrator.resetData();
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     wsClient = ItUtils.newAdminWsClient(orchestrator);
   }
index c585f6afbfb2f3761feac0369f2daafb90cbf071..cdcf92f1e1c7a29d02d697e2ef6f6402899f918d 100644 (file)
@@ -20,7 +20,7 @@
 package it.measure;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import org.junit.Before;
@@ -59,7 +59,7 @@ public class ProjectOverviewTest {
 
   private void executeBuild(String projectLocation, String projectKey, String projectName) {
     orchestrator.executeBuild(
-      SonarRunner.create(projectDir(projectLocation))
+      SonarScanner.create(projectDir(projectLocation))
         .setProjectKey(projectKey)
         .setProjectName(projectName)
     );
index c6fa73a8255a2bfa3f1d39048ee0dff70b3983de..25406fc47ea50d4f6ea0486f5fc9982ee39a1713 100644 (file)
@@ -20,7 +20,7 @@
 package it.measure;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import org.junit.BeforeClass;
@@ -43,7 +43,7 @@ public class ProjectWidgetsTest {
   @BeforeClass
   public static void inspectProject() {
     orchestrator.executeBuild(
-      SonarRunner.create(projectDir("shared/xoo-sample"))
+      SonarScanner.create(projectDir("shared/xoo-sample"))
         .setProjectKey("project-widgets-test-project")
         .setProjectName("ProjectWidgetsTest Project")
     );
index 2cb3c19215ae6b96d1a23843512ee88376a9d063..014b6dbd6a4013c77cfd0851199b1e472bf77b8e 100644 (file)
@@ -20,7 +20,7 @@
 package it.measureFilter;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import org.junit.AfterClass;
@@ -48,7 +48,7 @@ public class MeasureFiltersTest {
   @BeforeClass
   public static void scanStruts() {
     orchestrator.resetData();
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-multi-modules-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample")));
     adminWsClient = newAdminWsClient(orchestrator);
 
     createUser("user-measure-filters", "User Measure Filters");
index 747e91f94a8a636791af60bca1f4d4f027067acf..066028fc82b413bf832495e38fb46d40537895af 100644 (file)
@@ -20,7 +20,7 @@
 package it.measureHistory;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
@@ -50,7 +50,7 @@ public class HistoryUiTest {
   }
 
   private static void analyzeProject(String path, String date) {
-    orchestrator.executeBuild(SonarRunner.create(projectDir(path))
+    orchestrator.executeBuild(SonarScanner.create(projectDir(path))
       .setProperties("sonar.projectDate", date));
   }
 
index 05fa389d17e0c1fa59430a33f65112beb1cd3c54..5f504a1fcaf393f8c9b0d979f9f53f7afdfb905a 100644 (file)
@@ -20,7 +20,7 @@
 package it.measureHistory;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category1Suite;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -74,7 +74,7 @@ public class SincePreviousVersionHistoryTest {
   }
 
   private static void analyzeProject(String version, @Nullable String exclusions, @Nullable String date) {
-    SonarRunner build = SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"))
+    SonarScanner build = SonarScanner.create(projectDir("shared/xoo-multi-modules-sample"))
       .setProperties("sonar.projectVersion", version);
     if (exclusions != null) {
       build.setProperties("sonar.exclusions", exclusions);
index 9c3585c369c8568b990f22dc11b0d74c347e264e..f2d803ebdcd1787681cf8c93e5a32ac97457790a 100644 (file)
@@ -21,7 +21,7 @@ package it.measureHistory;
 
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category1Suite;
 import java.util.Date;
@@ -73,7 +73,7 @@ public class TimeMachineTest {
   }
 
   private static BuildResult analyzeProject(String path, String date) {
-    return orchestrator.executeBuild(SonarRunner.create(projectDir(path), "sonar.projectDate", date));
+    return orchestrator.executeBuild(SonarScanner.create(projectDir(path), "sonar.projectDate", date));
   }
 
   @Test
index 4a09fc455b1adfa0cbebb2f2e2d1e00bcd44f0be..9e895ff444a3f30b8fe7ec3a810765c383034e09 100644 (file)
@@ -20,7 +20,7 @@
 package it.projectAdministration;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import org.junit.ClassRule;
@@ -47,7 +47,7 @@ public class BackgroundTasksTest {
 
   private void executeBuild(String projectKey, String projectName) {
     orchestrator.executeBuild(
-      SonarRunner.create(projectDir("shared/xoo-sample"))
+      SonarScanner.create(projectDir("shared/xoo-sample"))
         .setProjectKey(projectKey)
         .setProjectName(projectName)
     );
index c23d74f5882860d7e47e65412ef6ed893d57cbdf..cbc06eccdfa0230efab3a4d786382b64824058c0 100644 (file)
@@ -20,7 +20,7 @@
 package it.projectAdministration;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import org.junit.Before;
@@ -61,7 +61,7 @@ public class BulkDeletionTest {
 
   private void executeBuild(String projectKey, String projectName) {
     orchestrator.executeBuild(
-      SonarRunner.create(projectDir("shared/xoo-sample"))
+      SonarScanner.create(projectDir("shared/xoo-sample"))
         .setProjectKey(projectKey)
         .setProjectName(projectName)
       );
index fc6fecc44707b618e6e5d0d0f2d936a9ce85b9a7..accb2962162702bcf1347d9f55078ee84f1ead34 100644 (file)
@@ -20,7 +20,7 @@
 package it.projectAdministration;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import org.junit.ClassRule;
@@ -50,7 +50,7 @@ public class ProjectPermissionsTest {
 
   private void executeBuild(String projectKey, String projectName) {
     orchestrator.executeBuild(
-      SonarRunner.create(projectDir("shared/xoo-sample"))
+      SonarScanner.create(projectDir("shared/xoo-sample"))
         .setProjectKey(projectKey)
         .setProjectName(projectName)
     );
index 4a459dcd0718d69669d9dc083976cf336c935c05..ac0987a94d4fa4433d8a5c1adcc0ff2516ebc7d1 100644 (file)
@@ -20,7 +20,7 @@
 package it.projectComparison;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category4Suite;
 import org.junit.BeforeClass;
@@ -42,7 +42,7 @@ public class ProjectComparisonTest {
   @BeforeClass
   public static void inspectProject() {
     orchestrator.executeBuild(
-      SonarRunner.create(projectDir("shared/xoo-sample"))
+      SonarScanner.create(projectDir("shared/xoo-sample"))
         .setProjectKey("project-comparison-test-project")
         .setProjectName("ProjectComparisonTest Project")
     );
index 55a4b0551fb55e70e132fed1adafc1cb3702291b..e8e91e7e9ad81d3fb390592c7e2f90436b1cf737 100644 (file)
@@ -20,7 +20,7 @@
 package it.qualityGate;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import java.util.Iterator;
@@ -102,7 +102,7 @@ public class QualityGateNotificationTest {
       qgClient().setDefault(simple.id());
       qgClient().createCondition(NewCondition.create(simple.id()).metricKey("ncloc").period(1).operator("EQ").warningThreshold("0"));
 
-      SonarRunner analysis = SonarRunner.create(projectDir("qualitygate/xoo-sample"));
+      SonarScanner analysis = SonarScanner.create(projectDir("qualitygate/xoo-sample"));
       orchestrator.executeBuild(analysis);
       assertThat(fetchGateStatus().getData()).isEqualTo("OK");
 
index d81c6d2ee3c3fb4827ab6c42f66bf3871eb0d022..8bf30e4e9e379871f57d87170bd401cee2ebb417 100644 (file)
@@ -20,7 +20,7 @@
 package it.qualityGate;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import javax.annotation.Nullable;
@@ -137,7 +137,7 @@ public class QualityGateUiTest {
   }
 
   private void scanSample(@Nullable String date, @Nullable String profile) {
-    SonarRunner scan = SonarRunner.create(projectDir("shared/xoo-sample"))
+    SonarScanner scan = SonarScanner.create(projectDir("shared/xoo-sample"))
       .setProperties("sonar.cpd.skip", "true");
     if (date != null) {
       scan.setProperty("sonar.projectDate", date);
index 89e861b1941bd25d0e4dce0a5b94e5465e2d6e63..aed422800cc8272f1c7c6acf3afec91762511c38 100644 (file)
@@ -20,7 +20,7 @@
 package it.qualityModel;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category2Suite;
 import javax.annotation.CheckForNull;
@@ -66,7 +66,7 @@ public class MaintainabilityRatingMeasureTest {
     orchestrator.getServer().provisionProject(PROJECT, PROJECT);
     orchestrator.getServer().associateProjectToQualityProfile(PROJECT, "xoo", "with-many-rules");
 
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-multi-modules-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample")));
 
     assertThat(getMeasure(PROJECT, "sqale_rating").getIntValue()).isEqualTo(3);
     assertThat(getMeasure(PROJECT, "sqale_rating").getData()).isEqualTo("C");
@@ -90,7 +90,7 @@ public class MaintainabilityRatingMeasureTest {
     orchestrator.getServer().provisionProject(PROJECT, PROJECT);
     orchestrator.getServer().associateProjectToQualityProfile(PROJECT, "xoo", "with-many-rules");
 
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-multi-modules-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample")));
 
     assertThat(getMeasure(PROJECT, "sqale_debt_ratio").getValue()).isEqualTo(29.1d);
     assertThat(getMeasure(MODULE, "sqale_debt_ratio").getValue()).isEqualTo(28.5d);
@@ -105,14 +105,14 @@ public class MaintainabilityRatingMeasureTest {
     orchestrator.getServer().provisionProject("sample", "sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     Measure rating = getMeasure("sample", "sqale_rating");
     assertThat(rating.getIntValue()).isEqualTo(1);
     assertThat(rating.getData()).isEqualTo("A");
 
     debtConfiguration.updateDevelopmentCost(2);
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     rating = getMeasure("sample", "sqale_rating");
     assertThat(rating.getIntValue()).isEqualTo(4);
@@ -125,7 +125,7 @@ public class MaintainabilityRatingMeasureTest {
     orchestrator.getServer().provisionProject(PROJECT, PROJECT);
     orchestrator.getServer().associateProjectToQualityProfile(PROJECT, "xoo", "one-issue-per-line");
 
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-multi-modules-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample")));
 
     Measure rating = getMeasure(PROJECT, "sqale_rating");
     assertThat(rating.getIntValue()).isEqualTo(1);
@@ -133,7 +133,7 @@ public class MaintainabilityRatingMeasureTest {
 
     debtConfiguration.updateLanguageDevelopmentCost("xoo", 1);
     orchestrator.executeBuild(
-      SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"))
+      SonarScanner.create(projectDir("shared/xoo-multi-modules-sample"))
         .setProfile("one-issue-per-line"));
 
     rating = getMeasure(PROJECT, "sqale_rating");
@@ -147,14 +147,14 @@ public class MaintainabilityRatingMeasureTest {
     orchestrator.getServer().provisionProject("sample", "sample");
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     Measure rating = getMeasure("sample", "sqale_rating");
     assertThat(rating.getIntValue()).isEqualTo(1);
     assertThat(rating.getData()).isEqualTo("A");
 
     debtConfiguration.updateRatingGrid(0.001d, 0.005d, 0.01d, 0.015d);
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     rating = getMeasure("sample", "sqale_rating");
     assertThat(rating.getIntValue()).isEqualTo(5);
@@ -167,7 +167,7 @@ public class MaintainabilityRatingMeasureTest {
     orchestrator.getServer().provisionProject(PROJECT, PROJECT);
     orchestrator.getServer().associateProjectToQualityProfile(PROJECT, "xoo", "with-many-rules");
 
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-multi-modules-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample")));
 
     assertThat(getMeasure(PROJECT, "sqale_rating").getData()).isEqualTo("C");
     assertThat(getMeasure(PROJECT, "effort_to_reach_maintainability_rating_a").getIntValue()).isEqualTo(292);
index a1584523c31553f73ef4eda5158b3239a65d5932..ef92d86270f60e691e26b44e000e307b162becef 100644 (file)
@@ -20,7 +20,7 @@
 package it.qualityModel;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category2Suite;
 import java.util.List;
@@ -66,10 +66,10 @@ public class TechnicalDebtInIssueChangelogTest {
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-file");
 
     // Execute a first analysis to have a past snapshot
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     // Second analysis, existing issues on OneIssuePerFile will have their technical debt updated with the effort to fix
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample"))
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample"))
       .setProperties("sonar.oneIssuePerFile.effortToFix", "10"));
 
     IssueClient issueClient = orchestrator.getServer().wsClient().issueClient();
@@ -93,12 +93,12 @@ public class TechnicalDebtInIssueChangelogTest {
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-file");
 
     // Execute a first analysis to have a past snapshot
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     // One day -> 10 hours
     debtConfiguration.updateHoursInDay(10);
 
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample"))
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample"))
       // As OneIssuePerFile has a debt of 10 minutes, we multiply it by 72 to have 1 day and 2 hours of technical debtn
       .setProperties("sonar.oneIssuePerFile.effortToFix", "72")
       );
index 0acb73e58b28ba29d6582e175ec684cab9922116..f4ba792a436b3cd88aac6353663d2cdfe1e40fe6 100644 (file)
@@ -20,7 +20,7 @@
 package it.qualityModel;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category2Suite;
 import java.util.List;
@@ -61,7 +61,7 @@ public class TechnicalDebtTest {
     orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line");
 
     // Generate some issues
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     // All the issues should have a technical debt
     List<Issue> issues = orchestrator.getServer().wsClient().issueClient().find(IssueQuery.create()).list();
@@ -80,7 +80,7 @@ public class TechnicalDebtTest {
     // One day -> 10 hours
     debtConfiguration.updateHoursInDay(10);
 
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample"))
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample"))
       // As OneIssuePerFile has a debt of 10 minutes, we multiply it by 72 to have 1 day and 2 hours of technical debt
       .setProperties("sonar.oneIssuePerFile.effortToFix", "72")
       );
@@ -100,7 +100,7 @@ public class TechnicalDebtTest {
     // One day -> 10 hours : debt will be stored as 360.000 seconds (1 day * 10 hours per day * 60 * 60)
     debtConfiguration.updateHoursInDay(10);
 
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     // Issue debt was 1 day during analysis but will be displayed as 1 day and 2 hours (hours in day property was set
     // to 10 during analysis but is now 8)
index 7350325bff823e5d431e13daa785c64e193877b4..00dc2354bf282557740c665aee1b9962f3b215d1 100644 (file)
@@ -20,7 +20,7 @@
 package it.qualityModel;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category2Suite;
@@ -64,7 +64,7 @@ public class TechnicalDebtWidgetTest {
   }
 
   private static void scanProject(String date, String excludes) {
-    SonarRunner scan = SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"))
+    SonarScanner scan = SonarScanner.create(projectDir("shared/xoo-multi-modules-sample"))
       .setProperties("sonar.projectDate", date, "sonar.exclusions", excludes);
     orchestrator.executeBuild(scan);
   }
index 8981379e179decc392d37a13e8745fcbf9b5ec59..24fd65151a64c1397ef323c93a399faa6c1618ef 100644 (file)
@@ -20,7 +20,7 @@
 package it.serverSystem;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category4Suite;
 import java.io.File;
@@ -176,7 +176,7 @@ public class ServerSystemTest {
   // TODO should be moved elsewhere
   @Test
   public void not_fail_with_url_ending_by_jsp() {
-    orchestrator.executeBuild(SonarRunner.create(ItUtils.projectDir("shared/xoo-sample"))
+    orchestrator.executeBuild(SonarScanner.create(ItUtils.projectDir("shared/xoo-sample"))
       .setProperty("sonar.projectKey", "myproject.jsp"));
     // Access dashboard
     Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("url_ending_by_jsp",
index f0ebfe4816df16b58dd8709614c84b836cdb4f36..4472da3a92a95a85901774a7af2d172dcb427b65 100644 (file)
@@ -20,7 +20,7 @@
 package it.settings;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import java.net.URL;
 import org.junit.After;
@@ -97,9 +97,9 @@ public class SettingsTestRestartingOrchestrator {
       .build();
     orchestrator.start();
 
-    SonarRunner withDeprecatedKey = SonarRunner.create(projectDir("shared/xoo-sample"))
+    SonarScanner withDeprecatedKey = SonarScanner.create(projectDir("shared/xoo-sample"))
       .setProperty("sonar.deprecatedKey", "true");
-    SonarRunner withNewKey = SonarRunner.create(projectDir("shared/xoo-sample"))
+    SonarScanner withNewKey = SonarScanner.create(projectDir("shared/xoo-sample"))
       .setProperty("sonar.newKey", "true");
     // should not fail
     orchestrator.executeBuilds(withDeprecatedKey, withNewKey);
index 3c87d7c97f2e8b49992191fbec18e0a97da4283b..733786045790bcb0ca745c8a106fff6e5e5f3a8e 100644 (file)
@@ -20,7 +20,7 @@
 package it.settings;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category1Suite;
 import org.junit.ClassRule;
@@ -58,7 +58,7 @@ public class SubCategoriesTest {
    */
   @Test
   public void should_support_project_subcategories() {
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
 
     Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("subcategories",
       "/settings/subcategories/project-subcategories.html",
index a76ba175497fb5b11c0128131c2e18967097660d..106cd9ffbce7a5497d61f27a931a10bbe8745ed8 100644 (file)
@@ -20,7 +20,7 @@
 package it.test;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category2Suite;
 import java.io.File;
 import org.apache.commons.io.FileUtils;
@@ -56,7 +56,7 @@ public class CoverageTest {
 
   @Test
   public void unit_test_coverage() throws Exception {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-sample-ut-coverage")));
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-sample-ut-coverage")));
 
     Resource project = orchestrator.getServer().getWsClient().find(ResourceQuery.createForMetrics("sample-ut-coverage", ALL_COVERAGE_METRICS));
     assertThat(project.getMeasureValue("line_coverage")).isEqualTo(50.0);
@@ -87,7 +87,7 @@ public class CoverageTest {
 
   @Test
   public void unit_test_coverage_no_condition() throws Exception {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-sample-ut-coverage-no-condition")));
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-sample-ut-coverage-no-condition")));
 
     Resource project = orchestrator.getServer().getWsClient().find(ResourceQuery.createForMetrics("sample-ut-coverage", ALL_COVERAGE_METRICS));
     assertThat(project.getMeasureValue("line_coverage")).isEqualTo(50.0);
@@ -112,7 +112,7 @@ public class CoverageTest {
 
   @Test
   public void it_coverage() throws Exception {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-sample-it-coverage")));
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-sample-it-coverage")));
 
     Resource project = orchestrator.getServer().getWsClient().find(ResourceQuery.createForMetrics("sample-it-coverage", ALL_COVERAGE_METRICS));
     assertThat(project.getMeasureValue("coverage")).isNull();
@@ -136,7 +136,7 @@ public class CoverageTest {
 
   @Test
   public void ut_and_it_coverage() throws Exception {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-sample-overall-coverage")));
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-sample-overall-coverage")));
 
     Resource project = orchestrator.getServer().getWsClient().find(ResourceQuery.createForMetrics("sample-overall-coverage", ALL_COVERAGE_METRICS));
     assertThat(project.getMeasureValue("line_coverage")).isEqualTo(50.0);
@@ -175,7 +175,7 @@ public class CoverageTest {
    */
   @Test
   public void should_compute_coverage_on_project() {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-half-covered")));
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-half-covered")));
 
     Resource project = orchestrator.getServer().getWsClient().find(ResourceQuery.createForMetrics("xoo-half-covered", ALL_COVERAGE_METRICS));
     assertThat(project.getMeasureValue("coverage")).isEqualTo(50.0);
@@ -188,7 +188,7 @@ public class CoverageTest {
    */
   @Test
   public void should_ignore_coverage_on_full_path() {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-half-covered"))
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-half-covered"))
       .setProperty("sonar.coverage.exclusions", "src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo"));
 
     Resource project = orchestrator.getServer().getWsClient().find(ResourceQuery.createForMetrics("xoo-half-covered", ALL_COVERAGE_METRICS));
@@ -202,7 +202,7 @@ public class CoverageTest {
    */
   @Test
   public void should_ignore_coverage_on_pattern() {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-half-covered"))
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-half-covered"))
       .setProperty("sonar.coverage.exclusions", "**/UnCovered*"));
 
     Resource project = orchestrator.getServer().getWsClient().find(ResourceQuery.createForMetrics("xoo-half-covered", ALL_COVERAGE_METRICS));
@@ -216,7 +216,7 @@ public class CoverageTest {
    */
   @Test
   public void should_not_have_coverage_at_all() {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-half-covered"))
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-half-covered"))
       .setProperty("sonar.coverage.exclusions", "**/*"));
 
     Resource project = orchestrator.getServer().getWsClient().find(ResourceQuery.createForMetrics("xoo-half-covered", ALL_COVERAGE_METRICS));
index 656f8de6a007c11ab64bfb1a6b31c48c1b4ae83a..c6ebc56b30bfb2742391d4a78458d7be316cd3c8 100644 (file)
@@ -20,7 +20,7 @@
 package it.test;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category2Suite;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -47,7 +47,7 @@ public class CoverageTrackingTest {
 
   @Test
   public void test_coverage_per_test() throws Exception {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-sample-with-coverage-per-test")));
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-sample-with-coverage-per-test")));
 
     String tests = orchestrator.getServer().adminWsClient().get("api/tests/list", "testFileKey", "sample-with-tests:src/test/xoo/sample/SampleTest.xoo");
     JSONAssert.assertEquals(IOUtils.toString(this.getClass().getResourceAsStream("/test/CoverageTrackingTest/tests-expected.json"), "UTF-8"), tests, false);
index 07cbdb082e6c7bebcbed085ea0a50742041a05e3..9d14a1f05c3608a96c3e56c6d67f5912ac4c49cd 100644 (file)
@@ -20,7 +20,7 @@
 package it.test;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category2Suite;
 import org.assertj.core.data.Offset;
 import org.junit.BeforeClass;
@@ -51,11 +51,11 @@ public class NewCoverageTest {
   public static void analyze_project() {
     orchestrator.resetData();
 
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-sample-new-coverage-v1"))
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-sample-new-coverage-v1"))
       .setProperty("sonar.projectDate", "2015-02-01")
       .setProperty("sonar.scm.disabled", "false")
       );
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-sample-new-coverage-v2"))
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-sample-new-coverage-v2"))
       .setProperty("sonar.scm.disabled", "false"));
   }
 
index dc0ec63afca4cf811cde8a2d6dbd16fdd2e863d5..f0d11de053385c5571c5a5054a54f244b5dc5207 100644 (file)
@@ -20,7 +20,7 @@
 package it.test;
 
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category2Suite;
 import org.apache.commons.io.IOUtils;
 import org.junit.Before;
@@ -45,7 +45,7 @@ public class TestExecutionTest {
 
   @Test
   public void test_execution() throws Exception {
-    orchestrator.executeBuilds(SonarRunner.create(projectDir("testing/xoo-sample-with-tests-execution")));
+    orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-sample-with-tests-execution")));
 
     Resource project = orchestrator.getServer().getWsClient()
       .find(ResourceQuery.createForMetrics("sample-with-tests", "test_success_density", "test_failures", "test_errors", "tests", "skipped_tests", "test_execution_time"));
index 46e18f07e3a68105ba52315ac5bab1d686149b39..a97d6aad43784973881c94e642f9000045795cb0 100644 (file)
@@ -22,7 +22,7 @@ package it.user;
 import com.google.common.base.Function;
 import com.google.common.collect.Iterables;
 import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.Category4Suite;
 import java.util.List;
 import org.junit.Before;
@@ -52,7 +52,7 @@ public class FavouriteTest {
   @Before
   public void inspectProject() {
     orchestrator.resetData();
-    orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-sample")));
   }
 
   @Test
index 07a6ec4830acbdbd118329c8832f9c6b041ac342..83019aecd2f0439b1931e55bc704b4cbc3433baf 100644 (file)
@@ -21,7 +21,7 @@ package it.user;
 
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.FileLocation;
 import com.sonar.orchestrator.selenium.Selenese;
 import it.Category4Suite;
@@ -147,7 +147,7 @@ public class LocalAuthenticationTest {
     WsUserTokens.GenerateWsResponse generateWsResponse = userTokensWsClient.generate(new GenerateWsRequest()
       .setLogin(LOGIN)
       .setName(tokenName));
-    SonarRunner sampleProject = SonarRunner.create(projectDir("shared/xoo-sample"));
+    SonarScanner sampleProject = SonarScanner.create(projectDir("shared/xoo-sample"));
     sampleProject.setProperties(
       "sonar.login", generateWsResponse.getToken(),
       "sonar.password", "");
@@ -160,7 +160,7 @@ public class LocalAuthenticationTest {
 
   @Test
   public void run_analysis_with_incorrect_token() {
-    SonarRunner sampleProject = SonarRunner.create(projectDir("shared/xoo-sample"));
+    SonarScanner sampleProject = SonarScanner.create(projectDir("shared/xoo-sample"));
     sampleProject.setProperties(
       "sonar.login", "unknown-token",
       "sonar.password", "");