From 0ebeabf6a8f2821bdb9018c2c57ef937952d301f Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Sun, 14 Jun 2026 08:08:50 +0200 Subject: [PATCH 1/6] infrastrucutre for e2e tests --- .../java/com/condation/cms/cli/CMSCli.java | 2 +- integration-tests/pom.xml | 144 ++++++++++-------- .../condation/cms/e2e/CMSServerExtension.java | 82 ++++++++++ .../cms/e2e/PlaywrightExtension.java | 57 +++++++ .../com/condation/cms/e2e/SimpleTest.java | 48 ++++++ 5 files changed, 267 insertions(+), 66 deletions(-) create mode 100644 integration-tests/src/test/java/com/condation/cms/e2e/CMSServerExtension.java create mode 100644 integration-tests/src/test/java/com/condation/cms/e2e/PlaywrightExtension.java create mode 100644 integration-tests/src/test/java/com/condation/cms/e2e/SimpleTest.java diff --git a/cms-server/src/main/java/com/condation/cms/cli/CMSCli.java b/cms-server/src/main/java/com/condation/cms/cli/CMSCli.java index 6eee612c..6ed351cc 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/CMSCli.java +++ b/cms-server/src/main/java/com/condation/cms/cli/CMSCli.java @@ -50,7 +50,7 @@ public static CommandLine getCommandLine() { return new CommandLine(new CLICommand()); } - public static void main(String[] args) { + public static void main(String... args) { CMSCli.getCommandLine().execute(args); } } diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 7b63d240..ad000aec 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -1,72 +1,86 @@ - 4.0.0 - - com.condation.cms - cms-parent - 8.1.0 - - integration-tests - jar - integration-tests + 4.0.0 + + com.condation.cms + cms-parent + 8.1.0 + + integration-tests + jar + integration-tests - - true - true - + + true + true + - - - - org.apache.maven.plugins - maven-deploy-plugin - 3.1.4 - - true - - - - + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.4 + + true + + + + - - - com.condation.cms - cms-api - - - com.condation.cms - cms-filesystem - - - com.condation.cms - cms-core - - - com.condation.cms - cms-content - - - com.condation.cms - cms-hooksystem - - - com.condation.cms - cms-media - - - org.projectlombok - lombok - provided - - - org.apache.commons - commons-text - - - com.condation.cms - cms-test - test - - + + + + com.condation.cms + cms-server + ${project.version} + test + + + com.microsoft.playwright + playwright + 1.60.0 + test + + + + com.condation.cms + cms-api + + + com.condation.cms + cms-filesystem + + + com.condation.cms + cms-core + + + com.condation.cms + cms-content + + + com.condation.cms + cms-hooksystem + + + com.condation.cms + cms-media + + + org.projectlombok + lombok + provided + + + org.apache.commons + commons-text + + + com.condation.cms + cms-test + test + + \ No newline at end of file diff --git a/integration-tests/src/test/java/com/condation/cms/e2e/CMSServerExtension.java b/integration-tests/src/test/java/com/condation/cms/e2e/CMSServerExtension.java new file mode 100644 index 00000000..b787418b --- /dev/null +++ b/integration-tests/src/test/java/com/condation/cms/e2e/CMSServerExtension.java @@ -0,0 +1,82 @@ +package com.condation.cms.e2e; + +/*- + * #%L + * integration-tests + * %% + * Copyright (C) 2023 - 2026 CondationCMS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * #L% + */ + +import com.condation.cms.cli.CMSCli; +import com.condation.cms.cli.tools.CLIServerUtils; +import org.junit.jupiter.api.extension.BeforeAllCallback; +import org.junit.jupiter.api.extension.ExtensionContext; + +/** + * + * @author thmar + */ +public class CMSServerExtension implements BeforeAllCallback, AutoCloseable { + + private static volatile boolean started = false; + private static Thread serverThread; + + @Override + public void beforeAll(ExtensionContext context) throws Exception { + if (!started) { + started = true; + + System.setProperty("cms.home", "../test-server"); + + serverThread = new Thread(() -> { + CMSCli.main("server", "start"); + }); + serverThread.setDaemon(true); + serverThread.start(); + + waitForProcess(10); + + context.getRoot() + .getStore(ExtensionContext.Namespace.GLOBAL) + .put("server", this); + + } + } + + @Override + public void close() throws Exception { + CMSCli.main("server", "stop"); + serverThread.join(10_000); + } + + private static void waitForProcess(int timeoutSeconds) throws Exception { + var deadline = System.currentTimeMillis() + timeoutSeconds * 1000L; + + while (System.currentTimeMillis() < deadline) { + var process = CLIServerUtils.getCMSProcess(); + if (process.isPresent()) { + // Optional: PID auslesen und prüfen ob Prozess wirklich läuft + System.out.println("Server gestartet mit PID: " + process.get().pid()); + return; + } + Thread.sleep(200); + } + throw new IllegalStateException( + "Server-PID-File nicht erschienen nach " + timeoutSeconds + "s" + ); +} +} diff --git a/integration-tests/src/test/java/com/condation/cms/e2e/PlaywrightExtension.java b/integration-tests/src/test/java/com/condation/cms/e2e/PlaywrightExtension.java new file mode 100644 index 00000000..debe0f06 --- /dev/null +++ b/integration-tests/src/test/java/com/condation/cms/e2e/PlaywrightExtension.java @@ -0,0 +1,57 @@ +package com.condation.cms.e2e; + +/*- + * #%L + * integration-tests + * %% + * Copyright (C) 2023 - 2026 CondationCMS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * #L% + */ + +import com.microsoft.playwright.Browser; +import com.microsoft.playwright.Playwright; +import org.junit.jupiter.api.extension.BeforeAllCallback; +import org.junit.jupiter.api.extension.ExtensionContext; + +/** + * + * @author thmar + */ +public class PlaywrightExtension implements BeforeAllCallback, AutoCloseable { + + private static Playwright playwright; + private static Browser browser; + + @Override + public void beforeAll(ExtensionContext context) { + if (context.getRoot().getStore(ExtensionContext.Namespace.GLOBAL) + .get("playwright") == null) { + playwright = Playwright.create(); + browser = playwright.chromium().launch(); + context.getRoot() + .getStore(ExtensionContext.Namespace.GLOBAL) + .put("playwright", this); + } + } + + public static Browser getBrowser() { return browser; } + + @Override + public void close() throws Exception { + if (browser != null) browser.close(); + if (playwright != null) playwright.close(); + } +} diff --git a/integration-tests/src/test/java/com/condation/cms/e2e/SimpleTest.java b/integration-tests/src/test/java/com/condation/cms/e2e/SimpleTest.java new file mode 100644 index 00000000..f7579b3b --- /dev/null +++ b/integration-tests/src/test/java/com/condation/cms/e2e/SimpleTest.java @@ -0,0 +1,48 @@ +package com.condation.cms.e2e; + +/*- + * #%L + * integration-tests + * %% + * Copyright (C) 2023 - 2026 CondationCMS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * #L% + */ +import com.condation.cms.cli.tools.CLIServerUtils; +import com.microsoft.playwright.Page; +import com.microsoft.playwright.junit.UsePlaywright; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +/** + * + * @author thmar + */ +@ExtendWith({CMSServerExtension.class}) +@UsePlaywright +public class SimpleTest { + + @Test + void server_is_started() throws Exception { + Assertions.assertThat(CLIServerUtils.getCMSProcess()).isPresent(); + } + + @Test + void start_page(Page page) { + page.navigate("http://localhost:2020"); + Assertions.assertThat(page.locator("title").innerText()).isEqualTo("Startpage"); + } +} From 2910695e56c3d6755d6eba0309c81de0bc4ea2ff Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Sun, 14 Jun 2026 08:12:41 +0200 Subject: [PATCH 2/6] update github action --- .github/workflows/maven.yml | 38 +++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index c23b63b0..cbdde8fc 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,11 +1,3 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Java CI with Maven on: @@ -16,16 +8,42 @@ on: jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 + - name: Set up JDK 25 uses: actions/setup-java@v5 with: java-version: '25-ea' distribution: 'temurin' cache: maven + + # Playwright-Binaries cachen → kein erneuter Download bei jedem Run + - name: Cache Playwright browsers + uses: actions/cache@v5 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ hashFiles('**/pom.xml') }} + restore-keys: playwright- + + # Systembibliotheken für Chromium (fehlen auf Ubuntu-Runner) + - name: Install Playwright system dependencies + run: mvn -B exec:java -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install-deps chromium" --file pom.xml + + # Chromium-Binary installieren (nur wenn Cache nicht greift) + - name: Install Playwright browsers + run: mvn -B exec:java -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install chromium" --file pom.xml + - name: Build with Maven run: mvn -B package --file pom.xml + + # Test-Reports auch bei Fehlern sichern + - name: Upload Surefire Reports + if: failure() + uses: actions/upload-artifact@v4 + with: + name: surefire-reports + path: target/surefire-reports/ + retention-days: 7 \ No newline at end of file From 4bad013a7e47e4ac31b5f0f910952d91ff74b280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Marx=20=E3=8B=A1?= Date: Sun, 14 Jun 2026 08:26:44 +0200 Subject: [PATCH 3/6] Fix pipeline --- .github/workflows/maven.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index cbdde8fc..f0c47bbc 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -20,7 +20,7 @@ jobs: distribution: 'temurin' cache: maven - # Playwright-Binaries cachen → kein erneuter Download bei jedem Run + # Playwright-Binaries cachen → automatischer Download beim ersten Playwright.create() - name: Cache Playwright browsers uses: actions/cache@v5 with: @@ -28,22 +28,35 @@ jobs: key: playwright-${{ hashFiles('**/pom.xml') }} restore-keys: playwright- - # Systembibliotheken für Chromium (fehlen auf Ubuntu-Runner) - - name: Install Playwright system dependencies - run: mvn -B exec:java -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install-deps chromium" --file pom.xml - - # Chromium-Binary installieren (nur wenn Cache nicht greift) - - name: Install Playwright browsers - run: mvn -B exec:java -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install chromium" --file pom.xml + # Systembibliotheken für Chromium direkt via apt – kein Maven-Classpath-Problem + - name: Install Chromium system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libglib2.0-0 \ + libnss3 \ + libnspr4 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libcups2 \ + libdrm2 \ + libdbus-1-3 \ + libxkbcommon0 \ + libxcomposite1 \ + libxdamage1 \ + libxfixes3 \ + libxrandr2 \ + libgbm1 \ + libasound2t64 - name: Build with Maven run: mvn -B package --file pom.xml - # Test-Reports auch bei Fehlern sichern + # Test-Reports bei Fehler als Artifact sichern - name: Upload Surefire Reports if: failure() uses: actions/upload-artifact@v4 with: name: surefire-reports path: target/surefire-reports/ - retention-days: 7 \ No newline at end of file + retention-days: 7 From dc2c8f1fd23f70c1784be981f14b9332dfbccb95 Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Sun, 14 Jun 2026 15:14:04 +0200 Subject: [PATCH 4/6] remove legacy class add shortcode tests for demo project --- .../cms/e2e/PlaywrightExtension.java | 57 ------------------- .../com/condation/cms/e2e/ShortCodesTest.java | 56 ++++++++++++++++++ .../themes/demo/extensions/theme.extension.js | 2 +- 3 files changed, 57 insertions(+), 58 deletions(-) delete mode 100644 integration-tests/src/test/java/com/condation/cms/e2e/PlaywrightExtension.java create mode 100644 integration-tests/src/test/java/com/condation/cms/e2e/ShortCodesTest.java diff --git a/integration-tests/src/test/java/com/condation/cms/e2e/PlaywrightExtension.java b/integration-tests/src/test/java/com/condation/cms/e2e/PlaywrightExtension.java deleted file mode 100644 index debe0f06..00000000 --- a/integration-tests/src/test/java/com/condation/cms/e2e/PlaywrightExtension.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.condation.cms.e2e; - -/*- - * #%L - * integration-tests - * %% - * Copyright (C) 2023 - 2026 CondationCMS - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * #L% - */ - -import com.microsoft.playwright.Browser; -import com.microsoft.playwright.Playwright; -import org.junit.jupiter.api.extension.BeforeAllCallback; -import org.junit.jupiter.api.extension.ExtensionContext; - -/** - * - * @author thmar - */ -public class PlaywrightExtension implements BeforeAllCallback, AutoCloseable { - - private static Playwright playwright; - private static Browser browser; - - @Override - public void beforeAll(ExtensionContext context) { - if (context.getRoot().getStore(ExtensionContext.Namespace.GLOBAL) - .get("playwright") == null) { - playwright = Playwright.create(); - browser = playwright.chromium().launch(); - context.getRoot() - .getStore(ExtensionContext.Namespace.GLOBAL) - .put("playwright", this); - } - } - - public static Browser getBrowser() { return browser; } - - @Override - public void close() throws Exception { - if (browser != null) browser.close(); - if (playwright != null) playwright.close(); - } -} diff --git a/integration-tests/src/test/java/com/condation/cms/e2e/ShortCodesTest.java b/integration-tests/src/test/java/com/condation/cms/e2e/ShortCodesTest.java new file mode 100644 index 00000000..b6910021 --- /dev/null +++ b/integration-tests/src/test/java/com/condation/cms/e2e/ShortCodesTest.java @@ -0,0 +1,56 @@ +package com.condation.cms.e2e; + +/*- + * #%L + * integration-tests + * %% + * Copyright (C) 2023 - 2026 CondationCMS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * #L% + */ +import com.condation.cms.cli.tools.CLIServerUtils; +import com.microsoft.playwright.Page; +import com.microsoft.playwright.junit.UsePlaywright; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +/** + * + * @author thmar + */ +@ExtendWith({CMSServerExtension.class}) +@UsePlaywright +public class ShortCodesTest { + + + @Test + void bold_content(Page page) { + page.navigate("http://localhost:2020"); + Assertions.assertThat(page.content()).contains("This content will be bold"); + } + + @Test + void theme_name (Page page) { + page.navigate("http://localhost:2020"); + Assertions.assertThat(page.content()).contains("Hello, I'm your demo theme."); + } + + @Test + void say_hello (Page page) { + page.navigate("http://localhost:2020"); + Assertions.assertThat(page.content()).contains("

Hello, CondationCMS

"); + } +} diff --git a/test-server/themes/demo/extensions/theme.extension.js b/test-server/themes/demo/extensions/theme.extension.js index 495d91c4..946c9d82 100644 --- a/test-server/themes/demo/extensions/theme.extension.js +++ b/test-server/themes/demo/extensions/theme.extension.js @@ -13,7 +13,7 @@ $hooks.registerAction("system/content/shortCodes", ({shortCodes}) => { ) shortCodes.put( "say_hello", - ({name}) => `Hello, ${name}` + ({name}) => `

Hello, ${name}

` ) return null; }) From d718542bfeae82983cd85a96fde96e8d742f5372 Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Sun, 14 Jun 2026 15:26:52 +0200 Subject: [PATCH 5/6] add some basic tests --- .../com/condation/cms/e2e/ShortCodesTest.java | 1 - .../com/condation/cms/e2e/TemplateTest.java | 69 +++++++++++++++++++ .../themes/demo/extensions/theme.extension.js | 2 +- test-server/themes/demo/templates/start.html | 1 + 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 integration-tests/src/test/java/com/condation/cms/e2e/TemplateTest.java diff --git a/integration-tests/src/test/java/com/condation/cms/e2e/ShortCodesTest.java b/integration-tests/src/test/java/com/condation/cms/e2e/ShortCodesTest.java index b6910021..70752247 100644 --- a/integration-tests/src/test/java/com/condation/cms/e2e/ShortCodesTest.java +++ b/integration-tests/src/test/java/com/condation/cms/e2e/ShortCodesTest.java @@ -20,7 +20,6 @@ * along with this program. If not, see . * #L% */ -import com.condation.cms.cli.tools.CLIServerUtils; import com.microsoft.playwright.Page; import com.microsoft.playwright.junit.UsePlaywright; import org.assertj.core.api.Assertions; diff --git a/integration-tests/src/test/java/com/condation/cms/e2e/TemplateTest.java b/integration-tests/src/test/java/com/condation/cms/e2e/TemplateTest.java new file mode 100644 index 00000000..b9c589f6 --- /dev/null +++ b/integration-tests/src/test/java/com/condation/cms/e2e/TemplateTest.java @@ -0,0 +1,69 @@ +package com.condation.cms.e2e; + +/*- + * #%L + * integration-tests + * %% + * Copyright (C) 2023 - 2026 CondationCMS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * #L% + */ +import com.microsoft.playwright.Page; +import com.microsoft.playwright.junit.UsePlaywright; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +/** + * + * @author thmar + */ +@ExtendWith({CMSServerExtension.class}) +@UsePlaywright +public class TemplateTest { + + + @Test + void function_fn_message(Page page) { + page.navigate("http://localhost:2020"); + Assertions.assertThat(page.content()).contains("
MESSAGE: Hello ConditionCMS
"); + } + + @Test + void component_colored (Page page) { + page.navigate("http://localhost:2020"); + Assertions.assertThat(page.content()).containsIgnoringWhitespaces("
COMPONENT(content): This content should be red!
"); + } + + @Test + void component_component (Page page) { + page.navigate("http://localhost:2020"); + Assertions.assertThat(page.content()).contains("
COMPONENT: its a component
"); + } + + @Test + void component_temp_comp (Page page) { + page.navigate("http://localhost:2020"); + Assertions.assertThat(page.content()).containsIgnoringWhitespaces(""" + rendered: +
+
CondationCMS
+

+ a compontent rendered by a template +

+
+ """); + } +} diff --git a/test-server/themes/demo/extensions/theme.extension.js b/test-server/themes/demo/extensions/theme.extension.js index 946c9d82..bbf6276d 100644 --- a/test-server/themes/demo/extensions/theme.extension.js +++ b/test-server/themes/demo/extensions/theme.extension.js @@ -29,7 +29,7 @@ $hooks.registerAction("system/template/function", ({functions}) => { $hooks.registerAction("system/template/component", ({components}) => { components.put( "colored", - ({color, _content}) => `
COMPONENT: ${_content}
` + ({color, _content}) => `
COMPONENT(content): ${_content}
` ) components.put( "component", diff --git a/test-server/themes/demo/templates/start.html b/test-server/themes/demo/templates/start.html index 8c65dc80..e31823c2 100644 --- a/test-server/themes/demo/templates/start.html +++ b/test-server/themes/demo/templates/start.html @@ -42,6 +42,7 @@

simple compontent

Template component

+ --- {[ ext:tempcomp name="CondationCMS" message="a compontent rendered by a template" ]} {[ endext:tempcomp ]} --- From e98f93013d6fb252dfda800e1ef48183a638b0a4 Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Sun, 14 Jun 2026 15:36:51 +0200 Subject: [PATCH 6/6] disable performance tests on ci --- .../content/perf/MarkdownPerformanceTest.java | 2 ++ .../perf/TemplatePerformanceTest.java | 2 ++ pom.xml | 27 ++++++++++++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/cms-content/src/test/java/com/condation/cms/content/perf/MarkdownPerformanceTest.java b/cms-content/src/test/java/com/condation/cms/content/perf/MarkdownPerformanceTest.java index a0cc0449..7db75105 100644 --- a/cms-content/src/test/java/com/condation/cms/content/perf/MarkdownPerformanceTest.java +++ b/cms-content/src/test/java/com/condation/cms/content/perf/MarkdownPerformanceTest.java @@ -32,7 +32,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import com.github.noconnor.junitperf.JUnitPerfInterceptor; +import org.junit.jupiter.api.Tag; +@Tag("performance") @ExtendWith(JUnitPerfInterceptor.class) public class MarkdownPerformanceTest { diff --git a/cms-templates/src/test/java/com/condation/cms/templates/perf/TemplatePerformanceTest.java b/cms-templates/src/test/java/com/condation/cms/templates/perf/TemplatePerformanceTest.java index 8dbc11b9..7a8706cd 100644 --- a/cms-templates/src/test/java/com/condation/cms/templates/perf/TemplatePerformanceTest.java +++ b/cms-templates/src/test/java/com/condation/cms/templates/perf/TemplatePerformanceTest.java @@ -40,7 +40,9 @@ import java.time.Duration; import java.util.Map; +import org.junit.jupiter.api.Tag; +@Tag("performance") @ExtendWith(JUnitPerfInterceptor.class) public class TemplatePerformanceTest { diff --git a/pom.xml b/pom.xml index f0ad5f56..79b6e7b0 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ cms-test ${project.version} - + com.condation.cms cms-hooksystem ${project.version} @@ -619,5 +619,30 @@ + + ci + + + env.CI + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + --enable-preview + -javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar + -Xshare:off + + performance + + + + +