Giter Site home page Giter Site logo

testkube's Introduction

based on testkube - getting started

to install via CLI

./install-testkube.sh

to create a test via CLI on the local machine

N.B. Assumes testkube CLI is installed

testkube create test --file postman_collection.json --type postman/collection --name my-first-test

to see the dashboard

testkube dashboard

-OR-

# alias k=kubectl ## see https://kubernetes.io/docs/reference/kubectl/cheatsheet/
# k krew install ns ## assumes krew is installed
k ns testkube
k port-forward svc/testkube-dashboard 8888:8080
k port-forward svc/testkube-api-server 9088:8088

Tests are just markup files

e.g.

k get test -n testkube my-first-test -o yaml | yq

yields

apiVersion: tests.testkube.io/v3
kind: Test
metadata:
  creationTimestamp: "2023-04-04T19:27:32Z"
  generation: 1
  labels:
    executor: postman-executor
    test-type: postman-collection
  name: my-first-test
  namespace: testkube
  resourceVersion: "16483"
  uid: 2dbb219b-a5dc-48a5-bb61-4c498f019fc6
spec:
  content:
    data: |-
      {
        "info": {
          "_postman_id": "8af42c21-3e31-49c1-8b27-d6e60623a180",
          "name": "Kubeshop",
          "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
        },
        "item": [
          {
            "name": "Home",
            "event": [
              {
                "listen": "test",
                "script": {
                  "exec": [
                    "pm.test(\"Body matches string\", function () {",
                    "    pm.expect(pm.response.text()).to.include(\"Accelerator\");",
                    "});"
                  ],
                  "type": "text/javascript"
                }
              }
            ],
            "request": {
              "method": "GET",
              "header": [],
              "url": {
                "raw": "https://kubeshop.io/",
                "protocol": "https",
                "host": ["kubeshop", "io"],
                "path": [""]
              }
            },
            "response": []
          },
          {
            "name": "Team",
            "event": [
              {
                "listen": "test",
                "script": {
                  "exec": [
                    "pm.test(\"Status code is 200\", function () {",
                    "    pm.response.to.have.status(200);",
                    "});"
                  ],
                  "type": "text/javascript"
                }
              }
            ],
            "request": {
              "method": "GET",
              "header": [],
              "url": {
                "raw": "https://kubeshop.io/our-team",
                "protocol": "https",
                "host": ["kubeshop", "io"],
                "path": ["our-team"]
              }
            },
            "response": []
          }
        ]
      }
    type: string
  executionRequest: {}
  type: postman/collection
status:
  latestExecution:
    endTime: "2023-04-04T19:28:41Z"
    id: 642c7a3d2ad3d1f1c294385a
    number: 1
    startTime: "2023-04-04T19:27:57Z"
    status: passed

testkube's People

Contributors

stand-sure avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.