oute-services-test-case-sdk

0.0.40 • Public • Published

This module expose helper functions

  • Initialization
  params = {
    url: @server url
    token: @access token
  }
  TestCase = require("oute-services-test-case-sdk")
  test_case_instance = new TestCase(params)

Cache functions

Core functions

  • Save route
  body = {
    "asset_id": "q-GmTD5-K",
    "workspace_id": "ZzBfJMpfQ",
    "label": "Test case 1",
    "inputs": [
      {
        "a": 20,
        "b": 30
      }
    ],
    "asserts": [
      {
        "result": 50
      }
    ]
  }
  await test_case_instance.save(body)
  • Find One
  query = {
    "_id": "UvuPE2PGn"
  }
  await test_case_instance.findOne(query)
  • delete route
  test_case_id = "UvuPE2PGn"
  await test_case_instance.delete(test_case_id)
  • find
  query = {
    "asset_id": "q-GmTD5-K"
  }
  await test_case_instance.findByAssetId(query)
  • run
  body = {
    "project_id": "q-GmTD5-K",
    "environment_id": null,
    "data": []
  }
  await test_case_instance.run(body)

Readme

Keywords

none

Package Sidebar

Install

npm i oute-services-test-case-sdk

Weekly Downloads

775

Version

0.0.40

License

none

Unpacked Size

16.7 kB

Total Files

15

Last publish

Collaborators

  • oute