Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create dotCMS child project to host E2E tests #29845

Closed
Tracked by #29350
victoralfaro-dotcms opened this issue Sep 3, 2024 · 3 comments · Fixed by #29903 or #30009
Closed
Tracked by #29350

Create dotCMS child project to host E2E tests #29845

victoralfaro-dotcms opened this issue Sep 3, 2024 · 3 comments · Fixed by #29903 or #30009

Comments

@victoralfaro-dotcms
Copy link
Contributor

victoralfaro-dotcms commented Sep 3, 2024

Parent Issue

#29350

User Story

As a dev-ops/CICD engineer, I want to create a new Maven module project to be included in the main dotCMS root Maven project file. This file should reference any new dependencies from the application BOM file, so changes in the corresponding POM will be required. Additionally, there should be some sort of output indicating a forked process that needs to be executed by a Maven plugin (probably Failsafe) at the same phase of integration and Postman tests.

Acceptance Criteria

  • A new Maven module project is created and integrated into the dotCMS root Maven project file.
  • Dependencies are correctly referenced from the application BOM file.
  • The corresponding POM file is updated with new dependencies.
  • Maven plugin (e.g., Failsafe) is configured to execute a forked process during the integration and Postman test phases.
  • Output is generated by the forked process to confirm successful execution.

dotCMS Version

master

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

to_define

Assumptions & Initiation Needs

  • Maven plugin configuration is required to manage a forked process.
  • Dependencies must be updated in the BOM file as part of the new Maven module project.

Quality Assurance Notes & Workarounds

  • Ensure that the Maven plugin runs correctly in the integration and Postman test phases.
  • Verify that the forked process generates the expected output without errors.

Sub-Tasks & Estimates

  1. Create new Maven module project and integrate with root POM - 4 hours
  2. Update BOM file with new dependencies - 2 hours
  3. Configure Maven plugin (Failsafe) for forked process - 3 hours
  4. Test integration and output generation - 5 hours
@victoralfaro-dotcms victoralfaro-dotcms self-assigned this Sep 4, 2024
victoralfaro-dotcms added a commit that referenced this issue Sep 6, 2024
victoralfaro-dotcms added a commit that referenced this issue Sep 13, 2024
victoralfaro-dotcms added a commit that referenced this issue Sep 13, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 18, 2024
…ocation from maven. (#29903)

The initial implementation for E2E tests consists in including a nested
multi-module maven project wrapping two maven regular modules. These
modules will support the lifecycle of the E2E Tests for both `Java` and
`Node.js` languages.

Besides all the regular files these maven modules need, it also includes
the `failsafe` and `io.fabric8` maven plugins configurations and
invocations to:
- Start a dotCMS instance to test against
- Run the E2E test against this instance

Refs: #29845

Co-authored-by: Daniel Enrique Colina Rodríguez <[email protected]>
@victoralfaro-dotcms
Copy link
Contributor Author

victoralfaro-dotcms commented Sep 18, 2024

QA Notes:
Since this is merely for developers usage to test this initiative please run:

# Build dotCMS
./mvnw -DskipTests clean install

Then

# Java E2E tests
./mvnw -pl :dotcms-e2e-java verify -De2e.test.skip=false

and

# Node.js E2E tests
./mvnw -pl :dotcms-e2e-node verify -De2e.test.skip=false
  • Make sure that maven did exit without any errors
  • Make sure that 4 Docker container were started: db, ES, WireMock and dotCMS

To kill any remaining containers run:

./mvnw -pl :dotcms-e2e -Pdocker-stop -De2e.test.skip=false

victoralfaro-dotcms added a commit that referenced this issue Sep 18, 2024
@victoralfaro-dotcms victoralfaro-dotcms removed their assignment Sep 18, 2024
@jcastro-dotcms jcastro-dotcms self-assigned this Sep 18, 2024
victoralfaro-dotcms added a commit that referenced this issue Sep 18, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 19, 2024
…2E tests invocation from maven (#30009)

Second PR for initial implementation for E2E `Node.js` tests. Using
maven project extending from our own `nodejs-parent` project.

Besides all the regular files these maven modules need, it also includes
the `failsafe` and `io.fabric8` maven plugins configurations and
invocations to:

Start a dotCMS instance to test against
Run the E2E test against this instance
Refs: #29845
@jcastro-dotcms
Copy link
Contributor

INTERNAL QA: PASSED

E2E testing for both Java and Node.js work perfectly. This is what I can see in my local:

  • The four Docker containers -- DB, ES, WireMock and dotCMS -- going up when tests are running, and going down when they finish.
  • The Chromium window testing exactly what the current tests dictate.

@jcastro-dotcms jcastro-dotcms removed their assignment Sep 19, 2024
@josemejias11
Copy link
Contributor

Approved: Tested on trunk_ea7843a, Docker, macOS 14.5, FF v126.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment