Skip to content

Commit

Permalink
workflow cases - playwright anc cypress artifacts, cypress 13 video r…
Browse files Browse the repository at this point in the history
…ecording enabled, cypress 12 video recording (fefault), playwright shell, artifacts double asterisk,
  • Loading branch information
tkonieczny committed Mar 11, 2024
1 parent c3e4c00 commit 5968f94
Show file tree
Hide file tree
Showing 3 changed files with 223 additions and 7 deletions.
85 changes: 81 additions & 4 deletions test/cypress/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,50 @@ spec:
env:
- name: CYPRESS_CUSTOM_ENV
value: CYPRESS_CUSTOM_ENV_value
- name: Saving artifacts
workingDir: /data/artifacts
artifacts:
steps:
- name: Saving artifacts
workingDir: /data/artifacts
artifacts:
paths:
- '**/*'
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: cypress-workflow-smoke-13-video-recording-enabled
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- '*'
- test/cypress/executor-tests/cypress-13
container:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
steps:
- name: Run tests
run:
image: cypress/included:13.6.4
args:
- --env
- NON_CYPRESS_ENV=NON_CYPRESS_ENV_value
- --config
- video=true
env:
- name: CYPRESS_CUSTOM_ENV
value: CYPRESS_CUSTOM_ENV_value
steps:
- name: Saving artifacts
workingDir: /data/repo/test/cypress/executor-tests/cypress-13/cypress/videos
artifacts:
paths:
- '**/*'
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
Expand Down Expand Up @@ -164,3 +203,41 @@ spec:
config:
version: 13.5.0
params: "--env NON_CYPRESS_ENV=NON_CYPRESS_ENV_value --config '{\"screenshotsFolder\":\"/data/artifacts/screenshots\",\"videosFolder\":\"/data/artifacts/videos\"}'"
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: cypress-workflow-smoke-12.7.0
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/cypress/executor-tests/cypress-12
container:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/cypress/executor-tests/cypress-12
steps:
- name: Run tests
run:
image: cypress/included:12.7.0
args:
- --env
- NON_CYPRESS_ENV=NON_CYPRESS_ENV_value
- --config
- '{"screenshotsFolder":"/data/artifacts/screenshots","videosFolder":"/data/artifacts/videos"}'
env:
- name: CYPRESS_CUSTOM_ENV
value: CYPRESS_CUSTOM_ENV_value
steps:
- name: Saving artifacts
workingDir: /data/artifacts
artifacts:
paths:
- '**/*'
12 changes: 11 additions & 1 deletion test/k6/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
steps:
- name: Run test
run:
image: grafana/k6:0.43.1
image: grafana/k6:0.49.0
args:
- run
- k6-smoke-test.js
Expand All @@ -29,6 +29,16 @@ spec:
env:
- name: K6_SYSTEM_ENV
value: K6_SYSTEM_ENV_value
- name: K6_WEB_DASHBOARD
value: "true"
- name: K6_WEB_DASHBOARD_EXPORT
value: /data/artifacts/k6-test-report.html
steps: # TODO: artifacts not working
- name: Saving artifacts
workingDir: /data/artifacts
artifacts:
paths:
- '**/*'
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
Expand Down
133 changes: 131 additions & 2 deletions test/playwright/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,48 @@ metadata:
name: playwright-workflow-smoke-v1.32.3
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/playwright/executor-tests/playwright-project
container:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/playwright/executor-tests/playwright-project
steps:
- name: Install dependencies
run:
image: mcr.microsoft.com/playwright:v1.32.3-focal
command:
- npm
args:
- ci
- name: Run tests
run:
image: mcr.microsoft.com/playwright:v1.32.3-focal
command:
- "npx"
args:
- "--yes"
- "[email protected]"
- "test"
- name: Save artifacts
workingDir: /data/repo/test/playwright/executor-tests/playwright-project
artifacts:
paths:
- playwright-report/**/*
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: playwright-workflow-smoke-v1.32.3-custom-report-dir
labels:
core-tests: workflows
spec:
content:
git:
Expand Down Expand Up @@ -36,11 +78,98 @@ spec:
- "test"
- "--output"
- "/data/artifacts"
env:
- name: PLAYWRIGHT_HTML_REPORT
value: /data/artifacts/playwright-report
steps:
- name: Save artifacts
workingDir: /data/artifacts
artifacts:
paths:
- '**/*'
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: playwright-workflow-smoke-v1.32.3-shell
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/playwright/executor-tests/playwright-project
container:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/playwright/executor-tests/playwright-project
steps:
- name: Install dependencies
run:
image: mcr.microsoft.com/playwright:v1.32.3-focal
command:
- npm
args:
- ci
- name: Run tests
shell: "npx --yes [email protected] test --output /data/artifacts && cd /data/artifacts && ls -lah"
container:
image: mcr.microsoft.com/playwright:v1.32.3-focal
env:
- name: PLAYWRIGHT_HTML_REPORT
value: /data/artifacts/playwright-report
steps:
- name: Save artifacts
workingDir: /data/artifacts
artifacts:
paths:
- '**/*'
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: playwright-workflow-smoke-artifacts-double-asterisk
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/playwright/executor-tests/playwright-project
container:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/playwright/executor-tests/playwright-project
steps:
- name: Install dependencies
run:
image: mcr.microsoft.com/playwright:v1.32.3-focal
command:
- npm
args:
- ci
- name: Run tests
run:
image: mcr.microsoft.com/playwright:v1.32.3-focal
command:
- "npx"
args:
- "--yes"
- "[email protected]"
- "test"
- name: Save artifacts
workingDir: /data/artifacts
artifacts:
paths:
- '*'
- /data/repo/**/playwright-report/**/*
---
---
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
Expand Down

0 comments on commit 5968f94

Please sign in to comment.