Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/manual-test-matrix-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@ jobs:
matrix:
specs:
[
"datasource",
"interface",
"path",
"batch-jberet",
"core-management",
"datasource",
"deployment-scanner",
"distributable-web",
"ee",
"ejb",
"elytron",
"elytron-oidc-client",
"health",
"homepage",
"interface",
"io",
"jmx",
"jpa",
"jsf",
"mail",
"microprofile",
"metrics",
"microprofile",
"path",
"runtime",
"security-manager",
"smoke",
"system-property",
"transaction",
"weld",
"homepage",
"smoke",
"update-manager",
"undertow",
"update-manager",
"weld",
]
exclude:
- specs: "update-manager"
Expand All @@ -57,7 +57,7 @@ jobs:
distribution: "adopt"
java-version: "17"
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
uses: browser-actions/setup-chrome@v2
with:
chrome-version: stable
- name: Install Firefox
Expand All @@ -71,15 +71,15 @@ jobs:
- name: "Run compile"
run: "npm run compile"
- name: "Run test(s)"
run: "npm run test:compiled -- --browser=firefox --specs=packages/testsuite/cypress/e2e/${{ matrix.specs }}"
run: "npm run test:compiled -- --browser=chrome --specs=packages/testsuite/cypress/e2e/${{ matrix.specs }}"
- name: "Archive test report(s) and video(s)"
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: "${{ github.run_id}}-${{ strategy.job-index }}-artifacts"
path: |
packages/testsuite/results
packages/testsuite/cypress/videos
results
cypress/videos
process_report:
name: "Collect results & deploy GH pages"
needs: test_matrix
Expand All @@ -97,7 +97,7 @@ jobs:
- name: "Generate Mochawesome Report"
run: mochawesome-merge "./*-artifacts/results/packages/testsuite/cypress/e2e/*.json" > mochawesome.json
- name: "Copy video assets"
run: copyfiles -u 3 "./*-artifacts/packages/testsuite/cypress/videos/*.mp4" mochawesome-report/assets/videos
run: copyfiles -u 2 "./*-artifacts/cypress/videos/*.mp4" mochawesome-report/assets/videos
- name: "Create GH Pages content"
run: marge mochawesome.json -f index.html
- name: "Get time info"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build-project-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
distribution: "adopt"
java-version: "17"
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
uses: browser-actions/setup-chrome@v2
with:
chrome-version: stable
- name: Install Firefox
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/scheduled-run-all-tests-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,34 @@ jobs:
matrix:
specs:
[
"datasource",
"interface",
"path",
"batch-jberet",
"core-management",
"datasource",
"deployment-scanner",
"distributable-web",
"ee",
"ejb",
"elytron",
"elytron-oidc-client",
"health",
"homepage",
"interface",
"io",
"jmx",
"jpa",
"jsf",
"mail",
"metrics",
"microprofile",
"path",
"runtime",
"security-manager",
"smoke",
"system-property",
"transaction",
"weld",
"homepage",
"smoke",
"update-manager",
"undertow",
"update-manager",
"weld",
]
exclude:
- specs: "update-manager"
Expand All @@ -57,7 +58,7 @@ jobs:
distribution: "adopt"
java-version: "17"
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
uses: browser-actions/setup-chrome@v2
with:
chrome-version: stable
- name: Install Firefox
Expand All @@ -78,8 +79,8 @@ jobs:
with:
name: "${{ github.run_id}}-${{ strategy.job-index }}-artifacts"
path: |
packages/testsuite/results
packages/testsuite/cypress/videos
results
cypress/videos
process_report:
name: "Collect results & deploy GH pages"
if: ${{ !cancelled() }}
Expand All @@ -97,7 +98,7 @@ jobs:
- name: "Generate Mochawesome Report"
run: mochawesome-merge "./*-artifacts/results/packages/testsuite/cypress/e2e/*.json" > mochawesome.json
- name: "Copy video assets"
run: copyfiles -u 3 "./*-artifacts/packages/testsuite/cypress/videos/*.mp4" mochawesome-report/assets/videos
run: copyfiles -u 2 "./*-artifacts/cypress/videos/*.mp4" mochawesome-report/assets/videos
- name: "Create GH Pages content"
run: marge mochawesome.json -f index.html
- name: "Get time info"
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ npm run develop
```

- If you want to execute whole testsuite execute `npm test`

- It is also possible to run on specific browser by supplying `--browser` argument, e.g
- Chrome is the default browser and is recommended for video recording. Firefox may produce black videos.
- For debugging purposes, you can run tests in headed mode (visible browser window) by adding `--headed` flag:

```
npm test -- --browser=chrome
npm test -- --browser=firefox --headed
or
npm test -- --browser=chrome --headed --specs="packages/testsuite/cypress/e2e/homepage/test-homepage.cy.ts"
```

- It is possible to reduce the amount of specs executed by passing `--specs` flag. It also supports glob patterns, e.g to execute only `homepage` related tests, run
Expand All @@ -81,7 +84,7 @@ npm run test:compiled -- --specs="packages/testsuite/cypress/e2e/homepage/test-h
HAL_IMAGE=quay.io/myorg/hal WILDFLY_IMAGE=quay.io/myorg/wildfly npm test ...
```

- For debugging purposes videos (and screenshots) of failed tests are stored after the test run (works only with chrome).
- For debugging purposes, videos and screenshots of failed tests are stored after the test run in `cypress/videos` and `cypress/screenshots` directories. Video recording works best with Chrome browser.

## Available environment properties

Expand Down
6 changes: 4 additions & 2 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const DEFAULT_WILDFLY_CONFIG = "standalone-insecure.xml";
export const WILDFLY_MANAGEMENT_PORT = 9990;
export const WILDFLY_STARTUP_TIMEOUT = 333000;
export const WILDFLY_PORT_RANGE = { min: 8080, max: 8180 };
export const WILDFLY_READY_TIMEOUT_MS = 10000;
export const WILDFLY_READY_TIMEOUT_MS = 60000;
export const WILDFLY_POLL_INTERVAL_MS = 500;

// Keycloak configuration
Expand Down Expand Up @@ -62,12 +62,14 @@ export const LOCALHOST_IP = "127.0.0.1";

export default defineConfig({
defaultCommandTimeout: 16000,
taskTimeout: 600000,
reporter: require.resolve("cypress-multi-reporters/index.js"),
reporterOptions: {
configFile: "reporter-config.json",
},
video: true,
videoCompression: false,
videoCompression: 32,
screenshotOnRunFailure: true,
e2e: {
supportFile: "packages/testsuite/cypress/support/e2e.ts",
specPattern: "packages/testsuite/cypress/e2e/**/*.cy.ts",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@cypress/xvfb": "1.2.4",
"@types/command-line-args": "5.2.3",
"@types/mochawesome": "6.2.4",
"@types/portscanner": "2.1.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/testsuite/cypress/support/containers-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Cypress.Commands.add("startWildflyContainer", (options = { useNetworkHostMode: f
configuration: "standalone-insecure.xml",
useNetworkHostMode: options.useNetworkHostMode,
},
{ timeout: 240_000 },
{ timeout: 600_000 },
);
});

Expand All @@ -18,7 +18,7 @@ Cypress.Commands.add("startWildflyContainerSecured", () => {
configuration: "standalone.xml",
useNetworkHostMode: true,
},
{ timeout: 240_000 },
{ timeout: 600_000 },
);
});

Expand Down
4 changes: 3 additions & 1 deletion packages/testsuite/run-e2e-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import { OptionDefinition } from "command-line-args";
import path from "path";

const optionDefinitions: OptionDefinition[] = [
{ name: "browser", type: String, defaultValue: "firefox" },
{ name: "browser", type: String, defaultValue: "chrome" },
{
name: "specs",
type: String,
defaultValue: "packages/testsuite/cypress/e2e/**/*.cy.ts",
},
{ name: "headed", type: Boolean, defaultValue: false },
];

(async () => {
Expand All @@ -20,6 +21,7 @@ const optionDefinitions: OptionDefinition[] = [
const projectRoot = path.resolve(__dirname, "..", "..", "..");
const testRunResult = await cypress.run({
browser: options.browser as string,
headed: options.headed as boolean,
project: projectRoot,
configFile: path.join(projectRoot, "cypress.config.ts"),
env: {
Expand Down