-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Workflow tests, preofficial traits (#5051)
* workflow tests - k6 * workflow tests - cypress * workflow tests - playwright * workflow tests - postman * workflow tests - gradle * workflow tests - maven * workflow tests - jmeter * workflow tests - soapui * workflow tests - cypress and playwright tests for official/preofficial traits * workflow tests - cypress pre-official trait * Workflows/Traits renamed * postman-workflow-smoke-preofficial-trait * test-workflow-templates - pre-official - k6, postman * workflow tests - postman * empty lines added
- Loading branch information
1 parent
68efc4c
commit 39e3890
Showing
11 changed files
with
565 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: cypress-workflow-smoke-13 | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
content: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- test/cypress/executor-tests/cypress-13 | ||
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 | ||
- '{"screenshotsFolder":"/data/artifacts/screenshots","videosFolder":"/data/artifacts/videos"}' | ||
env: | ||
- name: CYPRESS_CUSTOM_ENV | ||
value: CYPRESS_CUSTOM_ENV_value | ||
- name: Saving artifacts | ||
workingDir: /data/artifacts | ||
artifacts: | ||
paths: | ||
- '*' | ||
--- | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: cypress-workflow-smoke-13-negative | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
content: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- test/cypress/executor-tests/cypress-13 | ||
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 | ||
- '{"screenshotsFolder":"/data/artifacts/screenshots","videosFolder":"/data/artifacts/videos"}' | ||
negative: true | ||
- name: Saving artifacts | ||
workingDir: /data/artifacts | ||
artifacts: | ||
paths: | ||
- '**/*' | ||
--- | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
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" | ||
steps: | ||
- name: Checkout | ||
checkout: | ||
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: | ||
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\"}'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: gradle-workflow-smoke-jdk11 | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
content: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- contrib/executor/gradle/examples/hello-gradle | ||
resources: | ||
requests: | ||
cpu: 512m | ||
memory: 512Mi | ||
workingDir: /data/repo/contrib/executor/gradle/examples/hello-gradle | ||
steps: | ||
- name: Run tests | ||
run: | ||
image: gradle:8.5.0-jdk11 | ||
command: | ||
- gradle | ||
- --no-daemon | ||
- test | ||
env: | ||
- name: TESTKUBE_GRADLE | ||
value: "true" | ||
--- | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: gradle-workflow-smoke-jdk11-default-command # TODO: recheck if it's fixed - the step passes without being executed | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
content: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- contrib/executor/gradle/examples/hello-gradle | ||
resources: | ||
requests: | ||
cpu: 512m | ||
memory: 512Mi | ||
workingDir: /data/repo/contrib/executor/gradle/examples/hello-gradle | ||
steps: | ||
- name: Run tests | ||
run: | ||
image: gradle:8.5.0-jdk11 | ||
env: | ||
- name: TESTKUBE_GRADLE | ||
value: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: jmeter-workflow-smoke | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
content: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- test/jmeter/executor-tests/jmeter-executor-smoke.jmx | ||
resources: | ||
requests: | ||
cpu: 512m | ||
memory: 512Mi | ||
workingDir: /data/repo/test/jmeter/executor-tests | ||
steps: | ||
- name: Run tests | ||
run: | ||
image: justb4/jmeter:5.5 | ||
command: | ||
- jmeter | ||
args: | ||
- -n | ||
- -t | ||
- jmeter-executor-smoke.jmx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: k6-workflow-smoke | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
content: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- test/k6/executor-tests/k6-smoke-test.js | ||
resources: | ||
requests: | ||
cpu: 128m | ||
memory: 128Mi | ||
workingDir: /data/repo/test/k6/executor-tests | ||
steps: | ||
- name: Run test | ||
run: | ||
image: grafana/k6:0.43.1 | ||
args: | ||
- run | ||
- k6-smoke-test.js | ||
- -e | ||
- K6_ENV_FROM_PARAM=K6_ENV_FROM_PARAM_value | ||
env: | ||
- name: K6_SYSTEM_ENV | ||
value: K6_SYSTEM_ENV_value | ||
--- | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: k6-workflow-smoke-preofficial-trait | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
resources: | ||
requests: | ||
cpu: 128m | ||
memory: 128Mi | ||
workingDir: /data/repo/test/k6/executor-tests | ||
env: | ||
- name: K6_SYSTEM_ENV # currently only possible on this level | ||
value: K6_SYSTEM_ENV_value | ||
steps: | ||
- name: Checkout | ||
checkout: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- test/k6/executor-tests/k6-smoke-test.js | ||
- name: Run from trait | ||
workingDir: /data/repo/test/k6/executor-tests | ||
trait: | ||
name: pre-official/k6 | ||
config: | ||
version: 0.48.0 | ||
params: "k6-smoke-test.js -e K6_ENV_FROM_PARAM=K6_ENV_FROM_PARAM_value" | ||
--- | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: k6-workflow-smoke-preofficial-trait-without-checkout-step | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
content: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- test/k6/executor-tests/k6-smoke-test.js | ||
resources: | ||
requests: | ||
cpu: 128m | ||
memory: 128Mi | ||
workingDir: /data/repo/test/k6/executor-tests | ||
env: | ||
- name: K6_SYSTEM_ENV # currently only possible on this level | ||
value: K6_SYSTEM_ENV_value | ||
steps: | ||
- name: Run from trait | ||
workingDir: /data/repo/test/k6/executor-tests | ||
trait: | ||
name: pre-official/k6 | ||
config: | ||
version: 0.48.0 | ||
params: "k6-smoke-test.js -e K6_ENV_FROM_PARAM=K6_ENV_FROM_PARAM_value" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: maven-workflow-smoke-jdk11 | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
content: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- contrib/executor/maven/examples/hello-maven | ||
resources: | ||
requests: | ||
cpu: 256m | ||
memory: 256Mi | ||
workingDir: /data/repo/contrib/executor/maven/examples/hello-maven | ||
steps: | ||
- name: Run tests | ||
run: | ||
image: maven:3.9.6-eclipse-temurin-11-focal | ||
command: | ||
- "mvn" | ||
- "test" | ||
env: | ||
- name: TESTKUBE_MAVEN | ||
value: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
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 | ||
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" | ||
- "--output" | ||
- "/data/artifacts" | ||
- name: Save artifacts | ||
workingDir: /data/artifacts | ||
artifacts: | ||
paths: | ||
- '*' | ||
--- | ||
apiVersion: workflows.testkube.io/v1beta1 | ||
kind: Workflow | ||
metadata: | ||
name: playwright-workflow-smoke-official-trait | ||
labels: | ||
core-tests: workflows | ||
spec: | ||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: 2Gi | ||
workingDir: /data/repo/test/playwright/executor-tests/playwright-project | ||
steps: | ||
- name: Checkout | ||
checkout: | ||
git: | ||
uri: https://github.com/kubeshop/testkube | ||
revision: main | ||
paths: | ||
- test/playwright/executor-tests/playwright-project | ||
- name: Run from trait | ||
workingDir: /data/repo/test/playwright/executor-tests/playwright-project | ||
trait: | ||
name: official/playwright | ||
config: | ||
# params: --workers 4 | ||
tag: v1.32.3-jammy |
Oops, something went wrong.