- JOB=ITS IT_CATEGORY=administration
- JOB=ITS IT_CATEGORY=plugins
- JOB=ITS IT_CATEGORY=qualitygate
- - JOB=ITS IT_CATEGORY=ui
- JOB=ITS IT_CATEGORY=updatecenter
matrix:
@Test
public void fail_to_start_if_bad_keystore_credentials() throws Exception {
try {
- URL jksKeystore = getClass().getResource("/administration/HttpsTest/keystore.jks");
+ URL jksKeystore = getClass().getResource("/server/HttpsTest/keystore.jks");
orchestrator = Orchestrator.builderEnv()
.setServerProperty("sonar.web.https.port", String.valueOf(httpsPort))
.setServerProperty("sonar.web.https.keyAlias", "tests")
@Test
public void enable_https_port() throws Exception {
// start server
- URL jksKeystore = getClass().getResource("/administration/HttpsTest/keystore.jks");
+ URL jksKeystore = getClass().getResource("/server/HttpsTest/keystore.jks");
orchestrator = Orchestrator.builderEnv()
.setServerProperty("sonar.web.https.port", String.valueOf(httpsPort))
.setServerProperty("sonar.web.https.keyAlias", "tests")
orchestrator.start();
Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("derby-warnings",
- "/administration/ServerTest/derby-warning.html").build();
+ "/server/ServerTest/derby-warning.html").build();
orchestrator.executeSelenese(selenese);
}
}
orchestrator.start();
Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("jdbc-settings",
- "/administration/ServerTest/hide-jdbc-settings.html").build();
+ "/server/ServerTest/hide-jdbc-settings.html").build();
orchestrator.executeSelenese(selenese);
}
@Test
public void test_settings() {
- URL secretKeyUrl = getClass().getResource("/administration/ServerTest/sonar-secret.txt");
+ URL secretKeyUrl = getClass().getResource("/server/ServerTest/sonar-secret.txt");
orchestrator = Orchestrator.builderEnv()
.addPlugin(ItUtils.pluginArtifact("settings-plugin"))
.addPlugin(ItUtils.pluginArtifact("license-plugin"))
orchestrator.start();
Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("settings",
- "/administration/ServerTest/settings/general-settings.html",
+ "/server/ServerTest/settings/general-settings.html",
// SONAR-2869 the annotation @Properties can be used on extensions and not only on plugin entry points
- "/administration/ServerTest/settings/hidden-extension-property.html",
- "/administration/ServerTest/settings/global-extension-property.html",
+ "/server/ServerTest/settings/hidden-extension-property.html",
+ "/server/ServerTest/settings/global-extension-property.html",
// SONAR-3344 - licenses
- "/administration/ServerTest/settings/ignore-corrupted-license.html",
- "/administration/ServerTest/settings/display-license.html",
- "/administration/ServerTest/settings/display-untyped-license.html",
+ "/server/ServerTest/settings/ignore-corrupted-license.html",
+ "/server/ServerTest/settings/display-license.html",
+ "/server/ServerTest/settings/display-untyped-license.html",
// SONAR-2084 - encryption
- "/administration/ServerTest/settings/generate-secret-key.html",
- "/administration/ServerTest/settings/encrypt-text.html",
+ "/server/ServerTest/settings/generate-secret-key.html",
+ "/server/ServerTest/settings/encrypt-text.html",
// SONAR-1378 - property types
- "/administration/ServerTest/settings/validate-property-type.html",
+ "/server/ServerTest/settings/validate-property-type.html",
// SONAR-3127 - hide passwords
- "/administration/ServerTest/settings/hide-passwords.html"
+ "/server/ServerTest/settings/hide-passwords.html"
).build();
orchestrator.executeSelenese(selenese);
}
orchestrator.executeBuilds(withDeprecatedKey, withNewKey);
Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("property_relocation",
- "/administration/ServerTest/settings/property_relocation.html"
+ "/server/ServerTest/settings/property_relocation.html"
).build();
orchestrator.executeSelenese(selenese);
}
public void check_minimal_sonar_version_at_startup() throws Exception {
try {
orchestrator = Orchestrator.builderEnv()
- .addPlugin(FileLocation.of(new File(ServerTest.class.getResource("/administration/ServerTest/incompatible-plugin-1.0.jar").toURI())))
+ .addPlugin(FileLocation.of(new File(ServerTest.class.getResource("/server/ServerTest/incompatible-plugin-1.0.jar").toURI())))
.build();
orchestrator.start();
fail();
.setProperty("sonar.projectKey", "myproject.jsp"));
// Access dashboard
Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("url_ending_by_jsp",
- "/administration/ServerTest/url_ending_by_jsp.html").build();
+ "/server/ServerTest/url_ending_by_jsp.html").build();
orchestrator.executeSelenese(selenese);
}
orchestrator.start();
Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("settings-default-value",
- "/administration/ServerTest/settings-default-value.html").build();
+ "/server/ServerTest/settings-default-value.html").build();
orchestrator.executeSelenese(selenese);
}
*/
package administation.suite;
+import administation.suite.administration.BulkDeletionTest;
+import administation.suite.administration.ProjectAdministrationTest;
+import administation.suite.administration.PropertySetsTest;
+import administation.suite.administration.SubCategoriesTest;
+import administation.suite.administration.WebServiceTest;
+import administation.suite.server.ServerAdministrationTest;
import com.sonar.orchestrator.Orchestrator;
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import util.ItUtils;
+import static util.ItUtils.pluginArtifact;
+
@RunWith(Suite.class)
@Suite.SuiteClasses({
BulkDeletionTest.class,
.setServerProperty("sonar.notifications.delay", "1")
.addPlugin(ItUtils.pluginArtifact("property-sets-plugin"))
.addPlugin(ItUtils.pluginArtifact("sonar-subcategories-plugin"))
+
+ // Used in I18nTest
+ .addPlugin(pluginArtifact("l10n-fr-pack"))
+
.addPlugin(ItUtils.xooPlugin())
.build();
}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package administation.suite;
-
-import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
-import com.sonar.orchestrator.selenium.Selenese;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Test;
-
-import static util.ItUtils.projectDir;
-
-public class BulkDeletionTest {
-
- @ClassRule
- public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
-
- @Before
- public void deleteData() {
- orchestrator.resetData();
- }
-
- /**
- * SONAR-2614, SONAR-3805
- */
- @Test
- public void test_bulk_deletion_on_selected_projects() throws Exception {
- // we must have several projects to test the bulk deletion
- executeBuild("cameleon-1", "Sample-Project");
- executeBuild("cameleon-2", "Foo-Application");
- executeBuild("cameleon-3", "Bar-Sonar-Plugin");
-
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("project-bulk-deletion-on-selected-project",
- "/administration/suite/BulkDeletionTest/project-bulk-deletion/bulk-delete-filter-projects.html"
- ).build();
- orchestrator.executeSelenese(selenese);
- }
-
- /**
- * SONAR-4560
- */
- @Test
- public void should_support_two_letters_long_project_name() throws Exception {
- executeBuild("xo", "xo");
-
- Selenese selenese = Selenese.builder()
- .setHtmlTestsInClasspath("bulk-delete-projects-with-short-name",
- "/administration/suite/BulkDeletionTest/project-bulk-deletion/display-two-letters-long-project.html",
- "/administration/suite/BulkDeletionTest/project-bulk-deletion/filter-two-letters-long-project.html"
- ).build();
- orchestrator.executeSelenese(selenese);
- }
-
- private void executeBuild(String projectKey, String projectName) {
- orchestrator.executeBuild(
- SonarRunner.create(projectDir("shared/xoo-sample"))
- .setProjectKey(projectKey)
- .setProjectName(projectName)
- );
- }
-
-}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package administation.suite;
-
-import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
-import com.sonar.orchestrator.selenium.Selenese;
-import java.sql.SQLException;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import javax.annotation.Nullable;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.sonar.wsclient.SonarClient;
-import org.sonar.wsclient.base.HttpException;
-import org.sonar.wsclient.permissions.PermissionParameters;
-import org.sonar.wsclient.qualitygate.NewCondition;
-import org.sonar.wsclient.qualitygate.QualityGate;
-import org.sonar.wsclient.qualitygate.QualityGateClient;
-import org.sonar.wsclient.qualitygate.QualityGateCondition;
-import org.sonar.wsclient.qualitygate.UpdateCondition;
-import org.sonar.wsclient.services.PropertyQuery;
-import org.sonar.wsclient.services.ResourceQuery;
-import org.sonar.wsclient.user.UserParameters;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.projectDir;
-
-public class ProjectAdministrationTest {
-
- private static final String DELETE_WS_ENDPOINT = "api/projects/bulk_delete";
- @ClassRule
- public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
- private static final String PROJECT_KEY = "sample";
- private static final String FILE_KEY = "sample:src/main/xoo/sample/Sample.xoo";
-
- @Before
- public void deleteAnalysisData() throws SQLException {
- orchestrator.resetData();
- }
-
- @Test
- public void delete_project_by_web_service() {
- scanSampleWithDate("2012-01-01");
-
- assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(PROJECT_KEY))).isNotNull();
- assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(FILE_KEY))).isNotNull();
-
- orchestrator.getServer().adminWsClient().post(DELETE_WS_ENDPOINT, "keys", PROJECT_KEY);
-
- assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(PROJECT_KEY))).isNull();
- assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(FILE_KEY))).isNull();
- }
-
- @Test
- public void fail_when_trying_to_delete_a_file() {
- expectedException.expect(HttpException.class);
- scanSampleWithDate("2012-01-01");
-
- assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(PROJECT_KEY))).isNotNull();
- assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(FILE_KEY))).isNotNull();
-
- // it's forbidden to delete only some files
- orchestrator.getServer().adminWsClient().post(DELETE_WS_ENDPOINT, "keys", FILE_KEY);
- }
-
- @Test
- public void fail_when_insufficient_privilege() {
- expectedException.expect(HttpException.class);
- scanSampleWithDate("2012-01-01");
-
- assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(PROJECT_KEY))).isNotNull();
-
- // use wsClient() instead of adminWsClient()
- orchestrator.getServer().wsClient().post(DELETE_WS_ENDPOINT, "keys", PROJECT_KEY);
- }
-
- /**
- * Test updated for SONAR-3570 and SONAR-5923
- */
- @Test
- public void project_deletion() throws Exception {
- String projectAdminUser = "project-deletion-with-admin-permission-on-project";
- SonarClient adminClient = orchestrator.getServer().adminWsClient();
- try {
- SonarRunner scan = SonarRunner.create(projectDir("shared/xoo-sample"));
- orchestrator.executeBuild(scan);
-
- // Create user having admin permission on previously analysed project
- adminClient.userClient().create(
- UserParameters.create().login(projectAdminUser).name(projectAdminUser).password("password").passwordConfirmation("password"));
- adminClient.permissionClient().addPermission(
- PermissionParameters.create().user(projectAdminUser).component("sample").permission("admin"));
-
- orchestrator.executeSelenese(
- Selenese.builder().setHtmlTestsInClasspath("project-deletion", "/administration/suite/ProjectAdministrationTest/project-deletion/project-deletion.html").build()
- );
- } finally {
- adminClient.userClient().deactivate(projectAdminUser);
- }
- }
-
- // SONAR-4203
- @Test
- public void delete_version_of_multimodule_project() throws Exception {
- GregorianCalendar today = new GregorianCalendar();
- SonarRunner build = SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"))
- .setProperty("sonar.dynamicAnalysis", "false")
- .setProperty("sonar.projectDate", (today.get(Calendar.YEAR) - 1) + "-01-01");
- orchestrator.executeBuild(build);
-
- // The analysis must be run once again to have an history so that it is possible
- // to set/delete version on old snapshot
- build.setProperty("sonar.projectDate", today.get(Calendar.YEAR) + "-01-01");
- orchestrator.executeBuild(build);
-
- // There are 7 modules
- assertThat(count("events where category='Version'")).as("Different number of events").isEqualTo(7);
-
- Selenese selenese = Selenese
- .builder()
- .setHtmlTestsInClasspath("delete_version_of_multimodule_project",
- "/administration/suite/ProjectAdministrationTest/project-administration/multimodule-project-modify-version.html"
- ).build();
- orchestrator.executeSelenese(selenese);
-
- assertThat(count("events where category='Version'")).as("Different number of events").isEqualTo(14);
-
- selenese = Selenese
- .builder()
- .setHtmlTestsInClasspath("delete_version_of_multimodule_project",
- "/administration/suite/ProjectAdministrationTest/project-administration/multimodule-project-delete-version.html"
- ).build();
- orchestrator.executeSelenese(selenese);
-
- assertThat(count("events where category='Version'")).as("Different number of events").isEqualTo(7);
- }
-
- // SONAR-3326
- @Test
- public void display_alerts_correctly_in_history_page() throws Exception {
- QualityGateClient qgClient = orchestrator.getServer().adminWsClient().qualityGateClient();
- QualityGate qGate = qgClient.create("AlertsForHistory");
- qgClient.setDefault(qGate.id());
-
- // with this configuration, project should have an Orange alert
- QualityGateCondition lowThresholds = qgClient.createCondition(NewCondition.create(qGate.id()).metricKey("lines").operator("GT").warningThreshold("5").errorThreshold("50"));
- scanSampleWithDate("2012-01-01");
- // with this configuration, project should have a Green alert
- qgClient.updateCondition(UpdateCondition.create(lowThresholds.id()).metricKey("lines").operator("GT").warningThreshold("5000").errorThreshold("5000"));
- scanSampleWithDate("2012-01-02");
-
- Selenese selenese = Selenese
- .builder()
- .setHtmlTestsInClasspath("display-alerts-history-page",
- "/administration/suite/ProjectAdministrationTest/display-alerts-history-page/should-display-alerts-correctly-history-page.html"
- ).build();
- orchestrator.executeSelenese(selenese);
-
- qgClient.unsetDefault();
- qgClient.destroy(qGate.id());
- }
-
- /**
- * SONAR-1352
- */
- @Test
- public void display_period_alert_on_project_dashboard() throws Exception {
- QualityGateClient qgClient = orchestrator.getServer().adminWsClient().qualityGateClient();
- QualityGate qGate = qgClient.create("AlertsForDashboard");
- qgClient.createCondition(NewCondition.create(qGate.id()).metricKey("lines").operator("LT").warningThreshold("0").errorThreshold("10")
- .period(1));
- qgClient.setDefault(qGate.id());
-
- // No alert
- scanSampleWithDate("2012-01-01");
-
- // Red alert because lines number has not changed since previous analysis
- scanSample();
-
- Selenese selenese = Selenese
- .builder()
- .setHtmlTestsInClasspath("display-period-alerts",
- "/administration/suite/ProjectAdministrationTest/display-alerts/should-display-period-alerts-correctly.html"
- ).build();
- orchestrator.executeSelenese(selenese);
-
- qgClient.unsetDefault();
- qgClient.destroy(qGate.id());
- }
-
- /**
- * SONAR-3425
- */
- @Test
- public void project_settings() {
- scanSampleWithDate("2012-01-01");
-
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("project-settings",
- // SONAR-3425
- "/administration/suite/ProjectAdministrationTest/project-settings/override-global-settings.html",
-
- "/administration/suite/ProjectAdministrationTest/project-settings/only-on-project-settings.html"
- ).build();
- orchestrator.executeSelenese(selenese);
-
- assertThat(orchestrator.getServer().getAdminWsClient().find(PropertyQuery.createForResource("sonar.skippedModules", "sample")).getValue())
- .isEqualTo("my-excluded-module");
- }
-
- /**
- * SONAR-1608
- */
- @Test
- public void bulk_update_project_keys() {
- SonarRunner build = SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"));
- orchestrator.executeBuild(build);
-
- Selenese selenese = Selenese
- .builder()
- .setHtmlTestsInClasspath("project-bulk-update-keys",
- "/administration/suite/ProjectAdministrationTest/project-update-keys/bulk-update-impossible-because-duplicate-keys.html",
- "/administration/suite/ProjectAdministrationTest/project-update-keys/bulk-update-impossible-because-no-input.html",
- "/administration/suite/ProjectAdministrationTest/project-update-keys/bulk-update-impossible-because-no-match.html",
- "/administration/suite/ProjectAdministrationTest/project-update-keys/bulk-update-success.html"
- ).build();
- orchestrator.executeSelenese(selenese);
- }
-
- /**
- * SONAR-1608
- */
- @Test
- public void fine_grain_update_project_keys() {
- SonarRunner build = SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"));
- orchestrator.executeBuild(build);
-
- Selenese selenese = Selenese
- .builder()
- .setHtmlTestsInClasspath("project-fine-grained-update-keys",
- "/administration/suite/ProjectAdministrationTest/project-update-keys/fine-grained-update-impossible.html",
- "/administration/suite/ProjectAdministrationTest/project-update-keys/fine-grained-update-success.html"
- ).build();
- orchestrator.executeSelenese(selenese);
- }
-
- @Test
- public void anonymous_should_have_user_role_to_access_project() {
- scanSample();
-
- Selenese selenese = Selenese.builder()
- .setHtmlTestsInClasspath("anonymous_should_have_user_role_to_access_project",
- "/administration/suite/ProjectAdministrationTest/anonymous_should_have_user_role_to_access_project/remove_user_role.html"
- ).build();
- orchestrator.executeSelenese(selenese);
- }
-
- /**
- * SONAR-4060
- */
- @Test
- public void display_module_settings() {
- orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-multi-modules-sample")));
-
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("module-settings",
- // SONAR-3425
- "/administration/suite/ProjectAdministrationTest/module-settings/display-module-settings.html"
- ).build();
- orchestrator.executeSelenese(selenese);
- }
-
- private void scanSample() {
- scanSample(null, null);
- }
-
- private void scanSampleWithDate(String date) {
- scanSample(date, null);
- }
-
- private void scanSample(@Nullable String date, @Nullable String profile) {
- SonarRunner scan = SonarRunner.create(projectDir("shared/xoo-sample"))
- .setProperties("sonar.cpd.skip", "true");
- if (date != null) {
- scan.setProperty("sonar.projectDate", date);
- }
- if (profile != null) {
- scan.setProfile(profile);
- }
- orchestrator.executeBuild(scan);
- }
-
- private int count(String condition) {
- return orchestrator.getDatabase().countSql("select count(*) from " + condition);
- }
-
-}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package administation.suite;
-
-import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.selenium.Selenese;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.sonar.wsclient.services.PropertyQuery;
-import org.sonar.wsclient.services.PropertyUpdateQuery;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class PropertySetsTest {
-
- @ClassRule
- public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
-
- @Test
- public void should_support_property_sets() {
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("property-sets",
- "/administration/suite/PropertySetsTest/property-sets/create.html",
- "/administration/suite/PropertySetsTest/property-sets/delete.html",
- "/administration/suite/PropertySetsTest/property-sets/reference.html",
- "/administration/suite/PropertySetsTest/property-sets/all_types.html"
- ).build();
- orchestrator.executeSelenese(selenese);
-
- // SSF-25 Check that the password has well be setted as now it does not appears in the html source code
- String sonarDemoValue = getProperty("sonar.demo");
- assertThat(getProperty("sonar.demo." + sonarDemoValue + ".password")).isEqualTo("abcde");
- }
-
- @Test
- public void should_edit_properties() {
- setProperty("sonar.test.jira.servers", "jira1,jira2");
- setProperty("sonar.test.jira.servers.jira1.url", "http://jira1");
- setProperty("sonar.test.jira.servers.jira2.url", "http://jira2");
- setProperty("sonar.test.jira.servers.jira1.port", "12345");
- setProperty("sonar.test.jira.servers.jira2.port", "66666");
-
- assertThat(getProperty("sonar.test.jira.servers")).isEqualTo("jira1,jira2");
- assertThat(getProperty("sonar.test.jira.servers.jira1.url")).isEqualTo("http://jira1");
- assertThat(getProperty("sonar.test.jira.servers.jira2.url")).isEqualTo("http://jira2");
- assertThat(getProperty("sonar.test.jira.servers.jira1.port")).isEqualTo("12345");
- assertThat(getProperty("sonar.test.jira.servers.jira2.port")).isEqualTo("66666");
- }
-
- @Test
- public void should_support_property_sets_with_auto_generated_keys() {
- orchestrator.executeSelenese(Selenese.builder().setHtmlTestsInClasspath("create-auto-generated",
- "/administration/suite/PropertySetsTest/auto-generated/create.html"
- ).build());
-
- String[] keys = getProperty("sonar.autogenerated").split("[,]");
- assertThat(getProperty("sonar.autogenerated." + keys[0] + ".value")).isEqualTo("FIRST");
- assertThat(getProperty("sonar.autogenerated." + keys[1] + ".value")).isEqualTo("SECOND");
- assertThat(getProperty("sonar.autogenerated." + keys[2] + ".value")).isEqualTo("THIRD");
-
- orchestrator.executeSelenese(Selenese.builder().setHtmlTestsInClasspath("update-auto-generated",
- "/administration/suite/PropertySetsTest/auto-generated/update.html"
- ).build());
-
- keys = getProperty("sonar.autogenerated").split("[,]");
- assertThat(getProperty("sonar.autogenerated." + keys[0] + ".value")).isEqualTo("FIRST");
- assertThat(getProperty("sonar.autogenerated." + keys[1] + ".value")).isEqualTo("THIRD");
- }
-
- static void setProperty(String key, String value) {
- orchestrator.getServer().getAdminWsClient().update(new PropertyUpdateQuery(key, value));
- }
-
- static String getProperty(String key) {
- return orchestrator.getServer().getAdminWsClient().find(new PropertyQuery().setKey(key)).getValue();
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2009-2014 SonarSource SA
- * All rights reserved
- * mailto:contact AT sonarsource DOT com
- */
-package administation.suite;
-
-import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.selenium.Selenese;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.util.EntityUtils;
-import org.json.simple.JSONValue;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.sonar.wsclient.services.Server;
-import org.sonar.wsclient.services.ServerQuery;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.fail;
-
-public class ServerAdministrationTest {
-
- @ClassRule
- public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
-
- @Test
- public void get_sonar_version() {
- String version = orchestrator.getServer().getWsClient().find(new ServerQuery()).getVersion();
- if (!StringUtils.startsWithAny(version, new String[] {"5.", "6."})) {
- fail("Bad version: " + version);
- }
- }
-
- @Test
- public void get_server_status() {
- assertThat(orchestrator.getServer().getWsClient().find(new ServerQuery()).getStatus()).isEqualTo(Server.Status.UP);
- }
-
- @Test
- public void generate_server_id() {
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("server_id",
- "/administration/suite/ServerAdministrationTest/server_id/missing_ip.html",
- // SONAR-4102
- "/administration/suite/ServerAdministrationTest/organisation_must_not_accept_special_chars.html",
- "/administration/suite/ServerAdministrationTest/valid_id.html").build();
- orchestrator.executeSelenese(selenese);
- }
-
- @Test
- public void display_system_info() {
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("server-administration",
- "/administration/suite/ServerAdministrationTest/server-administration/system_info.html"
- ).build();
- orchestrator.executeSelenese(selenese);
- }
-
- /**
- * SONAR-3147
- */
- @Test
- public void test_widgets_web_service() throws IOException {
- HttpClient httpclient = new DefaultHttpClient();
- try {
- HttpGet get = new HttpGet(orchestrator.getServer().getUrl() + "/api/widgets");
- HttpResponse response = httpclient.execute(get);
-
- assertThat(response.getStatusLine().getStatusCode()).isEqualTo(200);
- String json = IOUtils.toString(response.getEntity().getContent());
- List widgets = (List) JSONValue.parse(json);
- assertThat(widgets.size()).isGreaterThan(10);
-
- // quick test of the first widget
- assertThat(((Map) widgets.get(0)).get("title")).isNotNull();
-
- EntityUtils.consume(response.getEntity());
-
- } finally {
- httpclient.getConnectionManager().shutdown();
- }
- }
-
- /**
- * SONAR-5197
- */
- @Test
- public void api_ws_shortcut() throws Exception {
- HttpClient httpclient = new DefaultHttpClient();
- try {
- HttpGet get = new HttpGet(orchestrator.getServer().getUrl() + "/api");
- HttpResponse response = httpclient.execute(get);
-
- assertThat(response.getStatusLine().getStatusCode()).isEqualTo(200);
- String json = IOUtils.toString(response.getEntity().getContent());
- Map jsonAsMap = (Map) JSONValue.parse(json);
- assertThat(jsonAsMap.get("webServices")).isNotNull();
- EntityUtils.consume(response.getEntity());
-
- } finally {
- httpclient.getConnectionManager().shutdown();
- }
- }
-}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package administation.suite;
-
-import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
-import com.sonar.orchestrator.selenium.Selenese;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.sonar.wsclient.services.PropertyQuery;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.projectDir;
-
-public class SubCategoriesTest {
-
- @ClassRule
- public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
-
- /**
- * SONAR-3159
- */
- @Test
- public void should_support_global_subcategories() {
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("subcategories",
- "/administration/suite/SubCategoriesTest/subcategories/global-subcategories.html",
- // SONAR-4495
- "/administration/suite/SubCategoriesTest/subcategories/global-subcategories-no-default.html"
- ).build();
- orchestrator.executeSelenese(selenese);
- assertThat(getProperty("prop3", null)).isEqualTo("myValue");
- }
-
- /**
- * SONAR-3159
- */
- @Test
- public void should_support_project_subcategories() {
- orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
-
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("subcategories",
- "/administration/suite/SubCategoriesTest/subcategories/project-subcategories.html",
- // SONAR-4495
- "/administration/suite/SubCategoriesTest/subcategories/project-subcategories-no-default.html"
- ).build();
- orchestrator.executeSelenese(selenese);
- assertThat(getProperty("prop3", "sample")).isEqualTo("myValue2");
- }
-
- static String getProperty(String key, String resourceKeyOrId) {
- return orchestrator.getServer().getAdminWsClient().find(new PropertyQuery().setKey(key).setResourceKeyOrId(resourceKeyOrId)).getValue();
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2009-2014 SonarSource SA
- * All rights reserved
- * mailto:contact AT sonarsource DOT com
- */
-package administation.suite;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
-import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
-import java.io.IOException;
-import java.util.List;
-import org.apache.commons.io.IOUtils;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.util.EntityUtils;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.sonar.wsclient.Sonar;
-import org.sonar.wsclient.services.Favourite;
-import org.sonar.wsclient.services.FavouriteCreateQuery;
-import org.sonar.wsclient.services.FavouriteDeleteQuery;
-import org.sonar.wsclient.services.FavouriteQuery;
-
-import static com.google.common.collect.Lists.newArrayList;
-import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.projectDir;
-
-public class WebServiceTest {
-
- @ClassRule
- public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
-
- @Before
- public void inspectProject() {
- orchestrator.resetData();
- orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
- }
-
- @Test
- public void favourites_web_service() throws Exception {
- Sonar adminWsClient = orchestrator.getServer().getAdminWsClient();
-
- // GET (nothing)
- List<Favourite> favourites = adminWsClient.findAll(new FavouriteQuery());
- assertThat(favourites).isEmpty();
-
- // POST (create favourites)
- Favourite favourite = adminWsClient.create(new FavouriteCreateQuery("sample"));
- assertThat(favourite).isNotNull();
- assertThat(favourite.getKey()).isEqualTo("sample");
- adminWsClient.create(new FavouriteCreateQuery("sample:src/main/xoo/sample/Sample.xoo"));
-
- // GET (created favourites)
- favourites = adminWsClient.findAll(new FavouriteQuery());
- assertThat(favourites).hasSize(2);
- List<String> keys = newArrayList(Iterables.transform(favourites, new Function<Favourite, String>() {
- @Override
- public String apply(Favourite input) {
- return input.getKey();
- }
- }));
- assertThat(keys).containsOnly("sample", "sample:src/main/xoo/sample/Sample.xoo");
-
- // DELETE (a favourite)
- adminWsClient.delete(new FavouriteDeleteQuery("sample"));
- favourites = adminWsClient.findAll(new FavouriteQuery());
- assertThat(favourites).hasSize(1);
- assertThat(favourites.get(0).getKey()).isEqualTo("sample:src/main/xoo/sample/Sample.xoo");
- }
-
- /**
- * SONAR-3105
- */
- @Test
- public void projects_web_service() throws IOException {
- SonarRunner build = SonarRunner.create(projectDir("shared/xoo-sample"));
- orchestrator.executeBuild(build);
-
- String url = orchestrator.getServer().getUrl() + "/api/projects?key=sample&versions=true";
- HttpClient httpclient = new DefaultHttpClient();
- try {
- HttpGet get = new HttpGet(url);
- HttpResponse response = httpclient.execute(get);
-
- assertThat(response.getStatusLine().getStatusCode()).isEqualTo(200);
- String content = IOUtils.toString(response.getEntity().getContent());
- assertThat(content).doesNotContain("error");
- assertThat(content).contains("sample");
- EntityUtils.consume(response.getEntity());
-
- } finally {
- httpclient.getConnectionManager().shutdown();
- }
- }
-
-}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package administation.suite.administration;
+
+import administation.suite.AdministrationTestSuite;
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.selenium.Selenese;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+
+import static util.ItUtils.projectDir;
+
+public class BulkDeletionTest {
+
+ @ClassRule
+ public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
+
+ @Before
+ public void deleteData() {
+ orchestrator.resetData();
+ }
+
+ /**
+ * SONAR-2614, SONAR-3805
+ */
+ @Test
+ public void test_bulk_deletion_on_selected_projects() throws Exception {
+ // we must have several projects to test the bulk deletion
+ executeBuild("cameleon-1", "Sample-Project");
+ executeBuild("cameleon-2", "Foo-Application");
+ executeBuild("cameleon-3", "Bar-Sonar-Plugin");
+
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("project-bulk-deletion-on-selected-project",
+ "/administration/suite/BulkDeletionTest/project-bulk-deletion/bulk-delete-filter-projects.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+ }
+
+ /**
+ * SONAR-4560
+ */
+ @Test
+ public void should_support_two_letters_long_project_name() throws Exception {
+ executeBuild("xo", "xo");
+
+ Selenese selenese = Selenese.builder()
+ .setHtmlTestsInClasspath("bulk-delete-projects-with-short-name",
+ "/administration/suite/BulkDeletionTest/project-bulk-deletion/display-two-letters-long-project.html",
+ "/administration/suite/BulkDeletionTest/project-bulk-deletion/filter-two-letters-long-project.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+ }
+
+ private void executeBuild(String projectKey, String projectName) {
+ orchestrator.executeBuild(
+ SonarRunner.create(projectDir("shared/xoo-sample"))
+ .setProjectKey(projectKey)
+ .setProjectName(projectName)
+ );
+ }
+
+}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package administation.suite.administration;
+
+import administation.suite.AdministrationTestSuite;
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.selenium.Selenese;
+import java.sql.SQLException;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import javax.annotation.Nullable;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.sonar.wsclient.SonarClient;
+import org.sonar.wsclient.base.HttpException;
+import org.sonar.wsclient.permissions.PermissionParameters;
+import org.sonar.wsclient.qualitygate.NewCondition;
+import org.sonar.wsclient.qualitygate.QualityGate;
+import org.sonar.wsclient.qualitygate.QualityGateClient;
+import org.sonar.wsclient.qualitygate.QualityGateCondition;
+import org.sonar.wsclient.qualitygate.UpdateCondition;
+import org.sonar.wsclient.services.PropertyQuery;
+import org.sonar.wsclient.services.ResourceQuery;
+import org.sonar.wsclient.user.UserParameters;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.projectDir;
+
+public class ProjectAdministrationTest {
+
+ private static final String DELETE_WS_ENDPOINT = "api/projects/bulk_delete";
+ @ClassRule
+ public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
+ @Rule
+ public ExpectedException expectedException = ExpectedException.none();
+
+ private static final String PROJECT_KEY = "sample";
+ private static final String FILE_KEY = "sample:src/main/xoo/sample/Sample.xoo";
+
+ @Before
+ public void deleteAnalysisData() throws SQLException {
+ orchestrator.resetData();
+ }
+
+ @Test
+ public void delete_project_by_web_service() {
+ scanSampleWithDate("2012-01-01");
+
+ assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(PROJECT_KEY))).isNotNull();
+ assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(FILE_KEY))).isNotNull();
+
+ orchestrator.getServer().adminWsClient().post(DELETE_WS_ENDPOINT, "keys", PROJECT_KEY);
+
+ assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(PROJECT_KEY))).isNull();
+ assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(FILE_KEY))).isNull();
+ }
+
+ @Test
+ public void fail_when_trying_to_delete_a_file() {
+ expectedException.expect(HttpException.class);
+ scanSampleWithDate("2012-01-01");
+
+ assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(PROJECT_KEY))).isNotNull();
+ assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(FILE_KEY))).isNotNull();
+
+ // it's forbidden to delete only some files
+ orchestrator.getServer().adminWsClient().post(DELETE_WS_ENDPOINT, "keys", FILE_KEY);
+ }
+
+ @Test
+ public void fail_when_insufficient_privilege() {
+ expectedException.expect(HttpException.class);
+ scanSampleWithDate("2012-01-01");
+
+ assertThat(orchestrator.getServer().getWsClient().find(ResourceQuery.create(PROJECT_KEY))).isNotNull();
+
+ // use wsClient() instead of adminWsClient()
+ orchestrator.getServer().wsClient().post(DELETE_WS_ENDPOINT, "keys", PROJECT_KEY);
+ }
+
+ /**
+ * Test updated for SONAR-3570 and SONAR-5923
+ */
+ @Test
+ public void project_deletion() throws Exception {
+ String projectAdminUser = "project-deletion-with-admin-permission-on-project";
+ SonarClient adminClient = orchestrator.getServer().adminWsClient();
+ try {
+ SonarRunner scan = SonarRunner.create(projectDir("shared/xoo-sample"));
+ orchestrator.executeBuild(scan);
+
+ // Create user having admin permission on previously analysed project
+ adminClient.userClient().create(
+ UserParameters.create().login(projectAdminUser).name(projectAdminUser).password("password").passwordConfirmation("password"));
+ adminClient.permissionClient().addPermission(
+ PermissionParameters.create().user(projectAdminUser).component("sample").permission("admin"));
+
+ orchestrator.executeSelenese(
+ Selenese.builder().setHtmlTestsInClasspath("project-deletion", "/administration/suite/ProjectAdministrationTest/project-deletion/project-deletion.html").build()
+ );
+ } finally {
+ adminClient.userClient().deactivate(projectAdminUser);
+ }
+ }
+
+ // SONAR-4203
+ @Test
+ public void delete_version_of_multimodule_project() throws Exception {
+ GregorianCalendar today = new GregorianCalendar();
+ SonarRunner build = SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"))
+ .setProperty("sonar.dynamicAnalysis", "false")
+ .setProperty("sonar.projectDate", (today.get(Calendar.YEAR) - 1) + "-01-01");
+ orchestrator.executeBuild(build);
+
+ // The analysis must be run once again to have an history so that it is possible
+ // to set/delete version on old snapshot
+ build.setProperty("sonar.projectDate", today.get(Calendar.YEAR) + "-01-01");
+ orchestrator.executeBuild(build);
+
+ // There are 7 modules
+ assertThat(count("events where category='Version'")).as("Different number of events").isEqualTo(7);
+
+ Selenese selenese = Selenese
+ .builder()
+ .setHtmlTestsInClasspath("delete_version_of_multimodule_project",
+ "/administration/suite/ProjectAdministrationTest/project-administration/multimodule-project-modify-version.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+
+ assertThat(count("events where category='Version'")).as("Different number of events").isEqualTo(14);
+
+ selenese = Selenese
+ .builder()
+ .setHtmlTestsInClasspath("delete_version_of_multimodule_project",
+ "/administration/suite/ProjectAdministrationTest/project-administration/multimodule-project-delete-version.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+
+ assertThat(count("events where category='Version'")).as("Different number of events").isEqualTo(7);
+ }
+
+ // SONAR-3326
+ @Test
+ public void display_alerts_correctly_in_history_page() throws Exception {
+ QualityGateClient qgClient = orchestrator.getServer().adminWsClient().qualityGateClient();
+ QualityGate qGate = qgClient.create("AlertsForHistory");
+ qgClient.setDefault(qGate.id());
+
+ // with this configuration, project should have an Orange alert
+ QualityGateCondition lowThresholds = qgClient.createCondition(NewCondition.create(qGate.id()).metricKey("lines").operator("GT").warningThreshold("5").errorThreshold("50"));
+ scanSampleWithDate("2012-01-01");
+ // with this configuration, project should have a Green alert
+ qgClient.updateCondition(UpdateCondition.create(lowThresholds.id()).metricKey("lines").operator("GT").warningThreshold("5000").errorThreshold("5000"));
+ scanSampleWithDate("2012-01-02");
+
+ Selenese selenese = Selenese
+ .builder()
+ .setHtmlTestsInClasspath("display-alerts-history-page",
+ "/administration/suite/ProjectAdministrationTest/display-alerts-history-page/should-display-alerts-correctly-history-page.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+
+ qgClient.unsetDefault();
+ qgClient.destroy(qGate.id());
+ }
+
+ /**
+ * SONAR-1352
+ */
+ @Test
+ public void display_period_alert_on_project_dashboard() throws Exception {
+ QualityGateClient qgClient = orchestrator.getServer().adminWsClient().qualityGateClient();
+ QualityGate qGate = qgClient.create("AlertsForDashboard");
+ qgClient.createCondition(NewCondition.create(qGate.id()).metricKey("lines").operator("LT").warningThreshold("0").errorThreshold("10")
+ .period(1));
+ qgClient.setDefault(qGate.id());
+
+ // No alert
+ scanSampleWithDate("2012-01-01");
+
+ // Red alert because lines number has not changed since previous analysis
+ scanSample();
+
+ Selenese selenese = Selenese
+ .builder()
+ .setHtmlTestsInClasspath("display-period-alerts",
+ "/administration/suite/ProjectAdministrationTest/display-alerts/should-display-period-alerts-correctly.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+
+ qgClient.unsetDefault();
+ qgClient.destroy(qGate.id());
+ }
+
+ /**
+ * SONAR-3425
+ */
+ @Test
+ public void project_settings() {
+ scanSampleWithDate("2012-01-01");
+
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("project-settings",
+ // SONAR-3425
+ "/administration/suite/ProjectAdministrationTest/project-settings/override-global-settings.html",
+
+ "/administration/suite/ProjectAdministrationTest/project-settings/only-on-project-settings.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+
+ assertThat(orchestrator.getServer().getAdminWsClient().find(PropertyQuery.createForResource("sonar.skippedModules", "sample")).getValue())
+ .isEqualTo("my-excluded-module");
+ }
+
+ /**
+ * SONAR-1608
+ */
+ @Test
+ public void bulk_update_project_keys() {
+ SonarRunner build = SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"));
+ orchestrator.executeBuild(build);
+
+ Selenese selenese = Selenese
+ .builder()
+ .setHtmlTestsInClasspath("project-bulk-update-keys",
+ "/administration/suite/ProjectAdministrationTest/project-update-keys/bulk-update-impossible-because-duplicate-keys.html",
+ "/administration/suite/ProjectAdministrationTest/project-update-keys/bulk-update-impossible-because-no-input.html",
+ "/administration/suite/ProjectAdministrationTest/project-update-keys/bulk-update-impossible-because-no-match.html",
+ "/administration/suite/ProjectAdministrationTest/project-update-keys/bulk-update-success.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+ }
+
+ /**
+ * SONAR-1608
+ */
+ @Test
+ public void fine_grain_update_project_keys() {
+ SonarRunner build = SonarRunner.create(projectDir("shared/xoo-multi-modules-sample"));
+ orchestrator.executeBuild(build);
+
+ Selenese selenese = Selenese
+ .builder()
+ .setHtmlTestsInClasspath("project-fine-grained-update-keys",
+ "/administration/suite/ProjectAdministrationTest/project-update-keys/fine-grained-update-impossible.html",
+ "/administration/suite/ProjectAdministrationTest/project-update-keys/fine-grained-update-success.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+ }
+
+ @Test
+ public void anonymous_should_have_user_role_to_access_project() {
+ scanSample();
+
+ Selenese selenese = Selenese.builder()
+ .setHtmlTestsInClasspath("anonymous_should_have_user_role_to_access_project",
+ "/administration/suite/ProjectAdministrationTest/anonymous_should_have_user_role_to_access_project/remove_user_role.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+ }
+
+ /**
+ * SONAR-4060
+ */
+ @Test
+ public void display_module_settings() {
+ orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-multi-modules-sample")));
+
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("module-settings",
+ // SONAR-3425
+ "/administration/suite/ProjectAdministrationTest/module-settings/display-module-settings.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+ }
+
+ private void scanSample() {
+ scanSample(null, null);
+ }
+
+ private void scanSampleWithDate(String date) {
+ scanSample(date, null);
+ }
+
+ private void scanSample(@Nullable String date, @Nullable String profile) {
+ SonarRunner scan = SonarRunner.create(projectDir("shared/xoo-sample"))
+ .setProperties("sonar.cpd.skip", "true");
+ if (date != null) {
+ scan.setProperty("sonar.projectDate", date);
+ }
+ if (profile != null) {
+ scan.setProfile(profile);
+ }
+ orchestrator.executeBuild(scan);
+ }
+
+ private int count(String condition) {
+ return orchestrator.getDatabase().countSql("select count(*) from " + condition);
+ }
+
+}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package administation.suite.administration;
+
+import administation.suite.AdministrationTestSuite;
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.selenium.Selenese;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.sonar.wsclient.services.PropertyQuery;
+import org.sonar.wsclient.services.PropertyUpdateQuery;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class PropertySetsTest {
+
+ @ClassRule
+ public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
+
+ @Test
+ public void should_support_property_sets() {
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("property-sets",
+ "/administration/suite/PropertySetsTest/property-sets/create.html",
+ "/administration/suite/PropertySetsTest/property-sets/delete.html",
+ "/administration/suite/PropertySetsTest/property-sets/reference.html",
+ "/administration/suite/PropertySetsTest/property-sets/all_types.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+
+ // SSF-25 Check that the password has well be setted as now it does not appears in the html source code
+ String sonarDemoValue = getProperty("sonar.demo");
+ assertThat(getProperty("sonar.demo." + sonarDemoValue + ".password")).isEqualTo("abcde");
+ }
+
+ @Test
+ public void should_edit_properties() {
+ setProperty("sonar.test.jira.servers", "jira1,jira2");
+ setProperty("sonar.test.jira.servers.jira1.url", "http://jira1");
+ setProperty("sonar.test.jira.servers.jira2.url", "http://jira2");
+ setProperty("sonar.test.jira.servers.jira1.port", "12345");
+ setProperty("sonar.test.jira.servers.jira2.port", "66666");
+
+ assertThat(getProperty("sonar.test.jira.servers")).isEqualTo("jira1,jira2");
+ assertThat(getProperty("sonar.test.jira.servers.jira1.url")).isEqualTo("http://jira1");
+ assertThat(getProperty("sonar.test.jira.servers.jira2.url")).isEqualTo("http://jira2");
+ assertThat(getProperty("sonar.test.jira.servers.jira1.port")).isEqualTo("12345");
+ assertThat(getProperty("sonar.test.jira.servers.jira2.port")).isEqualTo("66666");
+ }
+
+ @Test
+ public void should_support_property_sets_with_auto_generated_keys() {
+ orchestrator.executeSelenese(Selenese.builder().setHtmlTestsInClasspath("create-auto-generated",
+ "/administration/suite/PropertySetsTest/auto-generated/create.html"
+ ).build());
+
+ String[] keys = getProperty("sonar.autogenerated").split("[,]");
+ assertThat(getProperty("sonar.autogenerated." + keys[0] + ".value")).isEqualTo("FIRST");
+ assertThat(getProperty("sonar.autogenerated." + keys[1] + ".value")).isEqualTo("SECOND");
+ assertThat(getProperty("sonar.autogenerated." + keys[2] + ".value")).isEqualTo("THIRD");
+
+ orchestrator.executeSelenese(Selenese.builder().setHtmlTestsInClasspath("update-auto-generated",
+ "/administration/suite/PropertySetsTest/auto-generated/update.html"
+ ).build());
+
+ keys = getProperty("sonar.autogenerated").split("[,]");
+ assertThat(getProperty("sonar.autogenerated." + keys[0] + ".value")).isEqualTo("FIRST");
+ assertThat(getProperty("sonar.autogenerated." + keys[1] + ".value")).isEqualTo("THIRD");
+ }
+
+ static void setProperty(String key, String value) {
+ orchestrator.getServer().getAdminWsClient().update(new PropertyUpdateQuery(key, value));
+ }
+
+ static String getProperty(String key) {
+ return orchestrator.getServer().getAdminWsClient().find(new PropertyQuery().setKey(key)).getValue();
+ }
+}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package administation.suite.administration;
+
+import administation.suite.AdministrationTestSuite;
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.selenium.Selenese;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.sonar.wsclient.services.PropertyQuery;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.projectDir;
+
+public class SubCategoriesTest {
+
+ @ClassRule
+ public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
+
+ /**
+ * SONAR-3159
+ */
+ @Test
+ public void should_support_global_subcategories() {
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("subcategories",
+ "/administration/suite/SubCategoriesTest/subcategories/global-subcategories.html",
+ // SONAR-4495
+ "/administration/suite/SubCategoriesTest/subcategories/global-subcategories-no-default.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+ assertThat(getProperty("prop3", null)).isEqualTo("myValue");
+ }
+
+ /**
+ * SONAR-3159
+ */
+ @Test
+ public void should_support_project_subcategories() {
+ orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("subcategories",
+ "/administration/suite/SubCategoriesTest/subcategories/project-subcategories.html",
+ // SONAR-4495
+ "/administration/suite/SubCategoriesTest/subcategories/project-subcategories-no-default.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+ assertThat(getProperty("prop3", "sample")).isEqualTo("myValue2");
+ }
+
+ static String getProperty(String key, String resourceKeyOrId) {
+ return orchestrator.getServer().getAdminWsClient().find(new PropertyQuery().setKey(key).setResourceKeyOrId(resourceKeyOrId)).getValue();
+ }
+}
--- /dev/null
+/*
+ * Copyright (C) 2009-2014 SonarSource SA
+ * All rights reserved
+ * mailto:contact AT sonarsource DOT com
+ */
+package administation.suite.administration;
+
+import administation.suite.AdministrationTestSuite;
+import com.google.common.base.Function;
+import com.google.common.collect.Iterables;
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.build.SonarRunner;
+import java.io.IOException;
+import java.util.List;
+import org.apache.commons.io.IOUtils;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.util.EntityUtils;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.sonar.wsclient.Sonar;
+import org.sonar.wsclient.services.Favourite;
+import org.sonar.wsclient.services.FavouriteCreateQuery;
+import org.sonar.wsclient.services.FavouriteDeleteQuery;
+import org.sonar.wsclient.services.FavouriteQuery;
+
+import static com.google.common.collect.Lists.newArrayList;
+import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.projectDir;
+
+public class WebServiceTest {
+
+ @ClassRule
+ public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
+
+ @Before
+ public void inspectProject() {
+ orchestrator.resetData();
+ orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+ }
+
+ @Test
+ public void favourites_web_service() throws Exception {
+ Sonar adminWsClient = orchestrator.getServer().getAdminWsClient();
+
+ // GET (nothing)
+ List<Favourite> favourites = adminWsClient.findAll(new FavouriteQuery());
+ assertThat(favourites).isEmpty();
+
+ // POST (create favourites)
+ Favourite favourite = adminWsClient.create(new FavouriteCreateQuery("sample"));
+ assertThat(favourite).isNotNull();
+ assertThat(favourite.getKey()).isEqualTo("sample");
+ adminWsClient.create(new FavouriteCreateQuery("sample:src/main/xoo/sample/Sample.xoo"));
+
+ // GET (created favourites)
+ favourites = adminWsClient.findAll(new FavouriteQuery());
+ assertThat(favourites).hasSize(2);
+ List<String> keys = newArrayList(Iterables.transform(favourites, new Function<Favourite, String>() {
+ @Override
+ public String apply(Favourite input) {
+ return input.getKey();
+ }
+ }));
+ assertThat(keys).containsOnly("sample", "sample:src/main/xoo/sample/Sample.xoo");
+
+ // DELETE (a favourite)
+ adminWsClient.delete(new FavouriteDeleteQuery("sample"));
+ favourites = adminWsClient.findAll(new FavouriteQuery());
+ assertThat(favourites).hasSize(1);
+ assertThat(favourites.get(0).getKey()).isEqualTo("sample:src/main/xoo/sample/Sample.xoo");
+ }
+
+ /**
+ * SONAR-3105
+ */
+ @Test
+ public void projects_web_service() throws IOException {
+ SonarRunner build = SonarRunner.create(projectDir("shared/xoo-sample"));
+ orchestrator.executeBuild(build);
+
+ String url = orchestrator.getServer().getUrl() + "/api/projects?key=sample&versions=true";
+ HttpClient httpclient = new DefaultHttpClient();
+ try {
+ HttpGet get = new HttpGet(url);
+ HttpResponse response = httpclient.execute(get);
+
+ assertThat(response.getStatusLine().getStatusCode()).isEqualTo(200);
+ String content = IOUtils.toString(response.getEntity().getContent());
+ assertThat(content).doesNotContain("error");
+ assertThat(content).contains("sample");
+ EntityUtils.consume(response.getEntity());
+
+ } finally {
+ httpclient.getConnectionManager().shutdown();
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2009-2014 SonarSource SA
+ * All rights reserved
+ * mailto:contact AT sonarsource DOT com
+ */
+package administation.suite.server;
+
+import administation.suite.AdministrationTestSuite;
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.selenium.Selenese;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.util.EntityUtils;
+import org.json.simple.JSONValue;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.sonar.wsclient.services.Server;
+import org.sonar.wsclient.services.ServerQuery;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.fail;
+
+public class ServerAdministrationTest {
+
+ @ClassRule
+ public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
+
+ @Test
+ public void get_sonar_version() {
+ String version = orchestrator.getServer().getWsClient().find(new ServerQuery()).getVersion();
+ if (!StringUtils.startsWithAny(version, new String[] {"5.", "6."})) {
+ fail("Bad version: " + version);
+ }
+ }
+
+ @Test
+ public void get_server_status() {
+ assertThat(orchestrator.getServer().getWsClient().find(new ServerQuery()).getStatus()).isEqualTo(Server.Status.UP);
+ }
+
+ @Test
+ public void generate_server_id() {
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("server_id",
+ "/server/ServerAdministrationTest/server_id/missing_ip.html",
+ // SONAR-4102
+ "/server/ServerAdministrationTest/organisation_must_not_accept_special_chars.html",
+ "/server/ServerAdministrationTest/valid_id.html").build();
+ orchestrator.executeSelenese(selenese);
+ }
+
+ @Test
+ public void display_system_info() {
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("server-administration",
+ "/server/ServerAdministrationTest/server-administration/system_info.html"
+ ).build();
+ orchestrator.executeSelenese(selenese);
+ }
+
+ /**
+ * SONAR-3147
+ */
+ @Test
+ public void test_widgets_web_service() throws IOException {
+ HttpClient httpclient = new DefaultHttpClient();
+ try {
+ HttpGet get = new HttpGet(orchestrator.getServer().getUrl() + "/api/widgets");
+ HttpResponse response = httpclient.execute(get);
+
+ assertThat(response.getStatusLine().getStatusCode()).isEqualTo(200);
+ String json = IOUtils.toString(response.getEntity().getContent());
+ List widgets = (List) JSONValue.parse(json);
+ assertThat(widgets.size()).isGreaterThan(10);
+
+ // quick test of the first widget
+ assertThat(((Map) widgets.get(0)).get("title")).isNotNull();
+
+ EntityUtils.consume(response.getEntity());
+
+ } finally {
+ httpclient.getConnectionManager().shutdown();
+ }
+ }
+
+ /**
+ * SONAR-5197
+ */
+ @Test
+ public void api_ws_shortcut() throws Exception {
+ HttpClient httpclient = new DefaultHttpClient();
+ try {
+ HttpGet get = new HttpGet(orchestrator.getServer().getUrl() + "/api");
+ HttpResponse response = httpclient.execute(get);
+
+ assertThat(response.getStatusLine().getStatusCode()).isEqualTo(200);
+ String json = IOUtils.toString(response.getEntity().getContent());
+ Map jsonAsMap = (Map) JSONValue.parse(json);
+ assertThat(jsonAsMap.get("webServices")).isNotNull();
+ EntityUtils.consume(response.getEntity());
+
+ } finally {
+ httpclient.getConnectionManager().shutdown();
+ }
+ }
+}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package administation.suite.ui;
+
+import administation.suite.AdministrationTestSuite;
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.selenium.Selenese;
+import org.junit.After;
+import org.junit.ClassRule;
+import org.junit.Test;
+
+import static util.ItUtils.projectDir;
+
+public class I18nTest {
+
+ @ClassRule
+ public static Orchestrator orchestrator = AdministrationTestSuite.ORCHESTRATOR;
+
+ @After
+ public void cleanDatabase() {
+ orchestrator.resetData();
+ }
+
+ /**
+ * TODO This test should use a fake widget that display a fake metric with decimals instead of using provided metric
+ */
+ @Test
+ public void test_localization() {
+ orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
+
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("ui-i18n",
+ "/ui/i18n/default-locale-is-english.html",
+ "/ui/i18n/french-locale.html",
+ "/ui/i18n/french-pack.html",
+ "/ui/i18n/locale-with-france-country.html",
+ "/ui/i18n/locale-with-swiss-country.html").build();
+ orchestrator.executeSelenese(selenese);
+ }
+
+}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package ui;
-
-import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarRunner;
-import com.sonar.orchestrator.selenium.Selenese;
-import org.junit.After;
-import org.junit.ClassRule;
-import org.junit.Test;
-
-import static util.ItUtils.pluginArtifact;
-import static util.ItUtils.projectDir;
-import static util.ItUtils.xooPlugin;
-
-public class I18nTest {
-
- @ClassRule
- public static Orchestrator orchestrator = Orchestrator.builderEnv()
- .addPlugin(pluginArtifact("l10n-fr-pack"))
- .addPlugin(xooPlugin())
- .build();
-
- @After
- public void cleanDatabase() {
- orchestrator.resetData();
- }
-
- /**
- * TODO This test should use a fake widget that display a fake metric with decimals instead of using provided metric
- */
- @Test
- public void test_localization() {
- orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
-
- Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("ui-i18n",
- "/ui/i18n/default-locale-is-english.html",
- "/ui/i18n/french-locale.html",
- "/ui/i18n/french-pack.html",
- "/ui/i18n/locale-with-france-country.html",
- "/ui/i18n/locale-with-swiss-country.html").build();
- orchestrator.executeSelenese(selenese);
- }
-
-}
+++ /dev/null
-keytool -genkey -alias tests -keyalg RSA -keystore keystore.jks
-keystore password: thepassword
-key password for <tests>: thetests
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>derby-warning</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <thead>
- <tr>
- <td rowspan="1" colspan="3">derby-warning</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/</td>
- <td></td>
- </tr>
- <tr>
- <td>assertElementPresent</td>
- <td>evaluation_warning</td>
- <td></td>
- </tr>
- <tr>
- <td>assertText</td>
- <td>footer</td>
- <td>glob:*evaluation*</td>
- </tr>
-
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>hide-jdbc-settings</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <thead>
- <tr>
- <td rowspan="1" colspan="3">hide-jdbc-settings</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/setup/index</td>
- <td></td>
- </tr>
- <tr>
- <td>assertTextNotPresent</td>
- <td>jdbc:</td>
- <td></td>
- </tr>
-
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>settings-default-value</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <thead>
- <tr>
- <td rowspan="1" colspan="3">settings-default-value</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/widget?id=widget-displaying-properties</td>
- <td></td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>some-property</td>
- <td>aDefaultValue</td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>display-license</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/logout</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=general</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=input_typed.license.secured</td>
- <td>TmFtZTogRGV2ZWxvcHBlcnMKUGx1Z2luOiBhdXRvY29udHJvbApFeHBpcmVzOiAyMDEyLTA0LTAxCktleTogNjI5N2MxMzEwYzg2NDZiZTE5MDU1MWE4ZmZmYzk1OTBmYzEyYTIyMgo=</td>
- </tr>
- <tr>
- <td>click</td>
- <td>id=submit_settings</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForText</td>
- <td>block_typed.license.secured</td>
- <td>*autocontrol*</td>
- </tr>
- <tr>
- <td>assertText</td>
- <td>block_typed.license.secured</td>
- <td>*Developpers*</td>
- </tr>
- <tr>
- <td>assertText</td>
- <td>block_typed.license.secured</td>
- <td>*2012*</td>
- </tr>
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>display-untyped-license</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/logout</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=general</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=input_untyped.license.secured</td>
- <td>TmFtZTogRGV2ZWxvcHBlcnMKUGx1Z2luOiBhdXRvY29udHJvbApFeHBpcmVzOiAyMDEyLTA0LTAxCktleTogNjI5N2MxMzEwYzg2NDZiZTE5MDU1MWE4ZmZmYzk1OTBmYzEyYTIyMgo=</td>
- </tr>
- <tr>
- <td>click</td>
- <td>submit_settings</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForText</td>
- <td>block_untyped.license.secured</td>
- <td>*autocontrol*</td>
- </tr>
- <tr>
- <td>assertText</td>
- <td>block_untyped.license.secured</td>
- <td>*Developpers*</td>
- </tr>
- <tr>
- <td>assertText</td>
- <td>block_untyped.license.secured</td>
- <td>*2012*</td>
- </tr>
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>encrypt-text</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/logout</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=security&subcategory=encryption</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
- </tr>
- <tr>
- <td>selectFrame</td>
- <td>settings_iframe</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=clear_text</td>
- <td>clear</td>
- </tr>
- <tr>
- <td>click</td>
- <td>id=submit_encrypt</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForVisible</td>
- <td>encrypted_text</td>
- <td></td>
- </tr>
- <tr>
- <td>assertValue</td>
- <td>encrypted_text</td>
- <td>{aes}4aQbfYe1lrEjiRzv/ETbyg==</td>
- </tr>
-
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>settings_on_core_plugins</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <thead>
- <tr>
- <td rowspan="1" colspan="3">settings_on_core_plugins</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/logout</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/sonar/sessions/new</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>login</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>type</td>
- <td>password</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>commit</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/sonar/settings/index</td>
- <td></td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>plugins</td>
- <td>*General*</td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>generate-secret-key</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/logout</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=security&subcategory=encryption</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
- </tr>
- <tr>
- <td>selectFrame</td>
- <td>settings_iframe</td>
- <td></td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>link=secret key can be changed</td>
- <td></td>
- </tr>
- <tr>
- <td>click</td>
- <td>submit_generate_secret</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForVisible</td>
- <td>secret</td>
- <td></td>
- </tr>
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>global-extension-property</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <thead>
- <tr>
- <td rowspan="1" colspan="3">global-extension-property</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/new</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>commit</td>
- <td></td>
- </tr>
-
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=Settings</td>
- <td></td>
- </tr>
- <tr>
- <td>assertNotText</td>
- <td>plugins</td>
- <td>glob:*Hidden*</td>
- </tr>
-
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>hidden-extension-property</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <thead>
- <tr>
- <td rowspan="1" colspan="3">hidden-extension-property</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/new</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>commit</td>
- <td></td>
- </tr>
-
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=Settings</td>
- <td></td>
- </tr>
- <tr>
- <td>assertNotText</td>
- <td>plugins</td>
- <td>glob:*Hidden*</td>
- </tr>
-
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>hide-passwords</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/logout</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=Settings</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
- </tr>
- <tr>
- <td>assertText</td>
- <td>block_password</td>
- <td>*Default*</td>
- </tr>
- <tr>
- <td>assertNotText</td>
- <td>block_password</td>
- <td>*Default*sonar*</td>
- </tr>
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>ignore-corrupted-license</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/logout</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=general</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=input_typed.license.secured</td>
- <td>ABCDE</td>
- </tr>
- <tr>
- <td>click</td>
- <td>id=submit_settings</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForText</td>
- <td>block_typed.license.secured</td>
- <td>*Product*-*Organization*-*Expiration*-*</td>
- </tr>
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>property-relocation</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/logout</td>
- <td></td>
-</tr>
-<tr>
- <td>open</td>
- <td>/sonar/settings/index?category=general</td>
- <td></td>
-</tr>
-<tr>
- <td>type</td>
- <td>id=login</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>type</td>
- <td>id=password</td>
- <td>admin</td>
-</tr>
-<tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
-</tr>
-<tr>
- <td>assertText</td>
- <td>properties</td>
- <td>*sonar.newKey*</td>
-</tr>
-<tr>
- <td>assertNotText</td>
- <td>properties</td>
- <td>*sonar.deprecatedKey*</td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>validate-property-type</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/sessions/logout</td>
- <td></td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=Settings</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=login</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=password</td>
- <td>admin</td>
- </tr>
- <tr>
- <td>clickAndWait</td>
- <td>name=commit</td>
- <td></td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=input_float</td>
- <td>abc</td>
- </tr>
- <tr>
- <td>type</td>
- <td>id=input_integer</td>
- <td>123</td>
- </tr>
- <tr>
- <td>click</td>
- <td>id=submit_settings</td>
- <td></td>
- </tr>
- <tr>
- <td>waitForText</td>
- <td>properties</td>
- <td>*Not a floating point number*</td>
- </tr>
- <tr>
- <td>assertValue</td>
- <td>input_integer</td>
- <td>123</td>
- </tr>
- <tr>
- <td>open</td>
- <td>/sonar/settings?category=Settings</td>
- <td></td>
- </tr>
- <tr>
- <td>assertValue</td>
- <td>input_float</td>
- <td></td>
- </tr>
- </tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-0PZz+G+f8mjr3sPn4+AhHg==
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
- <tbody>
- <tr>
- <td>open</td>
- <td>/sonar/dashboard/index/myproject.jsp</td>
- <td></td>
- </tr>
- <tr>
- <td>assertElementPresent</td>
- <td>dashboard</td>
- <td></td>
- </tr>
-</table>
-</body>
-</html>
--- /dev/null
+keytool -genkey -alias tests -keyalg RSA -keystore keystore.jks
+keystore password: thepassword
+key password for <tests>: thetests
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>derby-warning</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">derby-warning</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertElementPresent</td>
+ <td>evaluation_warning</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>footer</td>
+ <td>glob:*evaluation*</td>
+ </tr>
+
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>hide-jdbc-settings</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">hide-jdbc-settings</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/setup/index</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertTextNotPresent</td>
+ <td>jdbc:</td>
+ <td></td>
+ </tr>
+
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>settings-default-value</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">settings-default-value</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/widget?id=widget-displaying-properties</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>some-property</td>
+ <td>aDefaultValue</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>display-license</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=general</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=login</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=password</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=input_typed.license.secured</td>
+ <td>TmFtZTogRGV2ZWxvcHBlcnMKUGx1Z2luOiBhdXRvY29udHJvbApFeHBpcmVzOiAyMDEyLTA0LTAxCktleTogNjI5N2MxMzEwYzg2NDZiZTE5MDU1MWE4ZmZmYzk1OTBmYzEyYTIyMgo=</td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>id=submit_settings</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForText</td>
+ <td>block_typed.license.secured</td>
+ <td>*autocontrol*</td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>block_typed.license.secured</td>
+ <td>*Developpers*</td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>block_typed.license.secured</td>
+ <td>*2012*</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>display-untyped-license</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=general</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=login</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=password</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=input_untyped.license.secured</td>
+ <td>TmFtZTogRGV2ZWxvcHBlcnMKUGx1Z2luOiBhdXRvY29udHJvbApFeHBpcmVzOiAyMDEyLTA0LTAxCktleTogNjI5N2MxMzEwYzg2NDZiZTE5MDU1MWE4ZmZmYzk1OTBmYzEyYTIyMgo=</td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>submit_settings</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForText</td>
+ <td>block_untyped.license.secured</td>
+ <td>*autocontrol*</td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>block_untyped.license.secured</td>
+ <td>*Developpers*</td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>block_untyped.license.secured</td>
+ <td>*2012*</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>encrypt-text</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=security&subcategory=encryption</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=login</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=password</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>selectFrame</td>
+ <td>settings_iframe</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=clear_text</td>
+ <td>clear</td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>id=submit_encrypt</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForVisible</td>
+ <td>encrypted_text</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertValue</td>
+ <td>encrypted_text</td>
+ <td>{aes}4aQbfYe1lrEjiRzv/ETbyg==</td>
+ </tr>
+
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>settings_on_core_plugins</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">settings_on_core_plugins</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/logout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/sonar/sessions/new</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>login</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/sonar/settings/index</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>plugins</td>
+ <td>*General*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>generate-secret-key</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=security&subcategory=encryption</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=login</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=password</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>selectFrame</td>
+ <td>settings_iframe</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>link=secret key can be changed</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>submit_generate_secret</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForVisible</td>
+ <td>secret</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>global-extension-property</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">global-extension-property</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/new</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>login</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>password</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=Settings</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertNotText</td>
+ <td>plugins</td>
+ <td>glob:*Hidden*</td>
+ </tr>
+
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>hidden-extension-property</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">hidden-extension-property</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/new</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>login</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>password</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>commit</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=Settings</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertNotText</td>
+ <td>plugins</td>
+ <td>glob:*Hidden*</td>
+ </tr>
+
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>hide-passwords</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=Settings</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=login</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=password</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertText</td>
+ <td>block_password</td>
+ <td>*Default*</td>
+ </tr>
+ <tr>
+ <td>assertNotText</td>
+ <td>block_password</td>
+ <td>*Default*sonar*</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>ignore-corrupted-license</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=general</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=login</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=password</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=input_typed.license.secured</td>
+ <td>ABCDE</td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>id=submit_settings</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForText</td>
+ <td>block_typed.license.secured</td>
+ <td>*Product*-*Organization*-*Expiration*-*</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>property-relocation</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/logout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/sonar/settings/index?category=general</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=login</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>id=password</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>properties</td>
+ <td>*sonar.newKey*</td>
+</tr>
+<tr>
+ <td>assertNotText</td>
+ <td>properties</td>
+ <td>*sonar.deprecatedKey*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>validate-property-type</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/sessions/logout</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=Settings</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=login</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=password</td>
+ <td>admin</td>
+ </tr>
+ <tr>
+ <td>clickAndWait</td>
+ <td>name=commit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=input_float</td>
+ <td>abc</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>id=input_integer</td>
+ <td>123</td>
+ </tr>
+ <tr>
+ <td>click</td>
+ <td>id=submit_settings</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>waitForText</td>
+ <td>properties</td>
+ <td>*Not a floating point number*</td>
+ </tr>
+ <tr>
+ <td>assertValue</td>
+ <td>input_integer</td>
+ <td>123</td>
+ </tr>
+ <tr>
+ <td>open</td>
+ <td>/sonar/settings?category=Settings</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertValue</td>
+ <td>input_float</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
--- /dev/null
+0PZz+G+f8mjr3sPn4+AhHg==
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/sonar/dashboard/index/myproject.jsp</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>assertElementPresent</td>
+ <td>dashboard</td>
+ <td></td>
+ </tr>
+</table>
+</body>
+</html>