diff --git a/test/cypress/executor-tests/crd-workflow/smoke.yaml b/test/cypress/executor-tests/crd-workflow/smoke.yaml new file mode 100644 index 00000000000..de03bf7c2fb --- /dev/null +++ b/test/cypress/executor-tests/crd-workflow/smoke.yaml @@ -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\"}'" diff --git a/test/gradle/executor-smoke/crd-workflow/smoke.yaml b/test/gradle/executor-smoke/crd-workflow/smoke.yaml new file mode 100644 index 00000000000..ba098d217f3 --- /dev/null +++ b/test/gradle/executor-smoke/crd-workflow/smoke.yaml @@ -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" diff --git a/test/jmeter/executor-tests/crd-workflow/smoke.yaml b/test/jmeter/executor-tests/crd-workflow/smoke.yaml new file mode 100644 index 00000000000..260654194b6 --- /dev/null +++ b/test/jmeter/executor-tests/crd-workflow/smoke.yaml @@ -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 diff --git a/test/k6/executor-tests/crd-workflow/smoke.yaml b/test/k6/executor-tests/crd-workflow/smoke.yaml new file mode 100644 index 00000000000..dbbf129101b --- /dev/null +++ b/test/k6/executor-tests/crd-workflow/smoke.yaml @@ -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" diff --git a/test/maven/executor-smoke/crd-workflow/smoke.yaml b/test/maven/executor-smoke/crd-workflow/smoke.yaml new file mode 100644 index 00000000000..b2f7be34ae4 --- /dev/null +++ b/test/maven/executor-smoke/crd-workflow/smoke.yaml @@ -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" diff --git a/test/playwright/executor-tests/crd-workflow/smoke.yaml b/test/playwright/executor-tests/crd-workflow/smoke.yaml new file mode 100644 index 00000000000..55517a678a7 --- /dev/null +++ b/test/playwright/executor-tests/crd-workflow/smoke.yaml @@ -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" + - "playwright@1.32.3" + - "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 diff --git a/test/postman/executor-tests/crd-workflow/smoke.yaml b/test/postman/executor-tests/crd-workflow/smoke.yaml new file mode 100644 index 00000000000..3815199ab30 --- /dev/null +++ b/test/postman/executor-tests/crd-workflow/smoke.yaml @@ -0,0 +1,104 @@ +apiVersion: workflows.testkube.io/v1beta1 +kind: Workflow +metadata: + name: postman-workflow-smoke + labels: + core-tests: workflows +spec: + content: + git: + uri: https://github.com/kubeshop/testkube + revision: main + paths: + - test/postman/executor-tests/postman-executor-smoke.postman_collection.json + resources: + requests: + cpu: 256m + memory: 128Mi + workingDir: /data/repo/test/postman/executor-tests + steps: + - name: Run test + run: + image: postman/newman:6-alpine + args: + - run + - postman-executor-smoke.postman_collection.json + - "--env-var" + - "TESTKUBE_POSTMAN_PARAM=TESTKUBE_POSTMAN_PARAM_value" +--- +apiVersion: workflows.testkube.io/v1beta1 +kind: Workflow +metadata: + name: postman-workflow-smoke-without-envs + labels: + core-tests: workflows +spec: + content: + git: + uri: https://github.com/kubeshop/testkube + revision: main + paths: + - test/postman/executor-tests/postman-executor-smoke-without-envs.postman_collection.json + resources: + requests: + cpu: 256m + memory: 128Mi + workingDir: /data/repo/test/postman/executor-tests + steps: + - name: Run test + run: + image: postman/newman:6-alpine + args: + - run + - postman-executor-smoke-without-envs.postman_collection.json +--- +apiVersion: workflows.testkube.io/v1beta1 +kind: Workflow +metadata: + name: postman-workflow-smoke-preofficial-trait + labels: + core-tests: workflows +spec: + content: + git: + uri: https://github.com/kubeshop/testkube + revision: main + paths: + - test/postman/executor-tests/postman-executor-smoke.postman_collection.json + resources: + requests: + cpu: 256m + memory: 128Mi + workingDir: /data/repo/test/postman/executor-tests + steps: + - name: Run from trait + workingDir: /data/repo/test/postman/executor-tests + trait: + name: pre-official/postman + config: + params: "postman-executor-smoke.postman_collection.json --env-var TESTKUBE_POSTMAN_PARAM=TESTKUBE_POSTMAN_PARAM_value" +--- +apiVersion: workflows.testkube.io/v1beta1 +kind: Workflow +metadata: + name: postman-workflow-smoke-preofficial-trait-without-envs + labels: + core-tests: workflows +spec: + content: + git: + uri: https://github.com/kubeshop/testkube + revision: main + paths: + - test/postman/executor-tests/postman-executor-smoke-without-envs.postman_collection.json + resources: + requests: + cpu: 256m + memory: 128Mi + workingDir: /data/repo/test/postman/executor-tests + steps: + - name: Run from trait + trait: + name: pre-official/postman + config: + params: "ppostman-executor-smoke-without-envs.postman_collection.json" diff --git a/test/soapui/executor-smoke/crd-workflow/smoke.yaml b/test/soapui/executor-smoke/crd-workflow/smoke.yaml new file mode 100644 index 00000000000..afd8b558e11 --- /dev/null +++ b/test/soapui/executor-smoke/crd-workflow/smoke.yaml @@ -0,0 +1,24 @@ +apiVersion: workflows.testkube.io/v1beta1 +kind: Workflow +metadata: + name: soapui-workflow-smoke + labels: + core-tests: workflows +spec: + content: + git: + uri: https://github.com/kubeshop/testkube + revision: main + paths: + - test/soapui/executor-smoke/soapui-smoke-test.xml + resources: + requests: + cpu: 512m + memory: 256Mi + steps: + - name: Run tests + run: + image: smartbear/soapuios-testrunner:5.7.2 # workingDir can't be used because of entrypoint script + env: + - name: COMMAND_LINE + value: "/data/repo/test/soapui/executor-smoke/soapui-smoke-test.xml" diff --git a/test/test-workflow-templates/cypress.yaml b/test/test-workflow-templates/cypress.yaml new file mode 100644 index 00000000000..55dd705af4b --- /dev/null +++ b/test/test-workflow-templates/cypress.yaml @@ -0,0 +1,27 @@ +kind: WorkflowTemplate +apiVersion: workflows.testkube.io/v1beta1 +metadata: + name: pre-official--cypress +spec: + config: + dependencies_command: + description: Command to install dependencies + type: string + default: npm install + version: + description: Cypress version to use + type: string + default: 13.6.4 + params: + description: Additional params for the cypress run command + type: string + default: "" + steps: + - name: Install dependencies + run: + image: cypress/included:{{ config.version }} + shell: '{{ config.dependencies_command }}' + - name: Run Cypress tests + run: + image: cypress/included:{{ config.version }} + shell: npx cypress run {{ config.params }} diff --git a/test/test-workflow-templates/k6.yaml b/test/test-workflow-templates/k6.yaml new file mode 100644 index 00000000000..49f663846da --- /dev/null +++ b/test/test-workflow-templates/k6.yaml @@ -0,0 +1,19 @@ +kind: Trait +apiVersion: workflows.testkube.io/v1beta1 +metadata: + name: pre-official--k6 +spec: + config: + version: + description: k6 version to use + type: string + default: 0.49.0 + params: + description: Additional params for the k6 run command + type: string + default: "" + steps: + - name: Run k6 tests + run: + image: grafana/k6:{{ config.version }} + shell: k6 run {{ config.params }} diff --git a/test/test-workflow-templates/postman.yaml b/test/test-workflow-templates/postman.yaml new file mode 100644 index 00000000000..f74b9307ca7 --- /dev/null +++ b/test/test-workflow-templates/postman.yaml @@ -0,0 +1,19 @@ +kind: Trait +apiVersion: workflows.testkube.io/v1beta1 +metadata: + name: pre-official--postman +spec: + config: + version: + description: Postman version to use + type: string + default: 6-alpine + params: + description: Additional params for the Postman (Newman) run command + type: string + default: "" + steps: + - name: Run Postman tests + run: + image: postman/newman:{{ config.version }} + shell: newman run {{ config.params }}