Skip to content

Commit

Permalink
feat: TestWorkflow tests updated after testworkflows.testkube.io/v1
Browse files Browse the repository at this point in the history
… and extended (#5138)

* workflows updated after testworkflows.testkube.io/v1

* run script - postman workflow fixed

* workflow tests - cases with trait updated, trait sub-step, trait with checkout on step, trait with global checkout

* workflow cases - playwright anc cypress artifacts, cypress 13 video recording enabled, cypress 12 video recording (fefault), playwright shell, artifacts double asterisk,

* workflows - k6
  • Loading branch information
tkonieczny authored Mar 11, 2024
1 parent 2d3ff85 commit 4daff68
Show file tree
Hide file tree
Showing 12 changed files with 449 additions and 161 deletions.
207 changes: 175 additions & 32 deletions test/cypress/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: cypress-workflow-smoke-13
labels:
Expand All @@ -11,11 +11,12 @@ spec:
revision: main
paths:
- test/cypress/executor-tests/cypress-13
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/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:
Expand All @@ -28,14 +29,53 @@ 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: workflows.testkube.io/v1beta1
kind: Workflow
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: cypress-workflow-smoke-13-negative
labels:
Expand All @@ -47,11 +87,12 @@ spec:
revision: main
paths:
- test/cypress/executor-tests/cypress-13
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/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:
Expand All @@ -68,33 +109,135 @@ spec:
paths:
- '**/*'
---
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: cypress-workflow-smoke-13-preofficial-trait
labels:
core-tests: workflows
spec:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
env:
- name: CYPRESS_CUSTOM_ENV # currently only possible on this level
value: "CYPRESS_CUSTOM_ENV_value"
container:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
env:
- name: CYPRESS_CUSTOM_ENV # currently only possible on this level
value: "CYPRESS_CUSTOM_ENV_value"
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/cypress/executor-tests/cypress-13
steps:
- name: Checkout
checkout:
- name: Run from trait
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
template:
name: pre-official/cypress
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-13-preofficial-trait-checkout-on-step
labels:
core-tests: workflows
spec:
container:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
env:
- name: CYPRESS_CUSTOM_ENV # currently only possible on this level
value: "CYPRESS_CUSTOM_ENV_value"
steps:
- name: Run from trait
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/cypress/executor-tests/cypress-13
- name: Run from trait
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
trait:
template:
name: pre-official/cypress
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-13-preofficial-trait-sub-step
labels:
core-tests: workflows
spec:
container:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
env:
- name: CYPRESS_CUSTOM_ENV # currently only possible on this level
value: "CYPRESS_CUSTOM_ENV_value"
steps:
- name: Run cypress test
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/cypress/executor-tests/cypress-13
steps:
- name: Run from trait
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
template:
name: pre-official/cypress
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:
- '**/*'
30 changes: 16 additions & 14 deletions test/gradle/executor-smoke/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: gradle-workflow-smoke-jdk11
labels:
Expand All @@ -11,11 +11,12 @@ spec:
revision: main
paths:
- contrib/executor/gradle/examples/hello-gradle
resources:
requests:
cpu: 512m
memory: 512Mi
workingDir: /data/repo/contrib/executor/gradle/examples/hello-gradle
container:
resources:
requests:
cpu: 512m
memory: 512Mi
workingDir: /data/repo/contrib/executor/gradle/examples/hello-gradle
steps:
- name: Run tests
run:
Expand All @@ -28,8 +29,8 @@ spec:
- name: TESTKUBE_GRADLE
value: "true"
---
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: gradle-workflow-smoke-jdk11-default-command # TODO: recheck if it's fixed - the step passes without being executed
labels:
Expand All @@ -41,11 +42,12 @@ spec:
revision: main
paths:
- contrib/executor/gradle/examples/hello-gradle
resources:
requests:
cpu: 512m
memory: 512Mi
workingDir: /data/repo/contrib/executor/gradle/examples/hello-gradle
container:
resources:
requests:
cpu: 512m
memory: 512Mi
workingDir: /data/repo/contrib/executor/gradle/examples/hello-gradle
steps:
- name: Run tests
run:
Expand Down
15 changes: 8 additions & 7 deletions test/jmeter/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: jmeter-workflow-smoke
labels:
Expand All @@ -11,11 +11,12 @@ spec:
revision: main
paths:
- test/jmeter/executor-tests/jmeter-executor-smoke.jmx
resources:
requests:
cpu: 512m
memory: 512Mi
workingDir: /data/repo/test/jmeter/executor-tests
container:
resources:
requests:
cpu: 512m
memory: 512Mi
workingDir: /data/repo/test/jmeter/executor-tests
steps:
- name: Run tests
run:
Expand Down
Loading

0 comments on commit 4daff68

Please sign in to comment.