{
  "source": "testing.js",
  "method": "run",
  "input-schema": {
    "type": "object",
    "additionalProperties": false,
    "properties" : {
      "testsFolder": {
        "type": "string",
        "format": "filechooser",
        "formatOptions": {
          "type": "folder"
        },
        "description": "Path to the folder where tests flows are located. All the test flows found within the specified depth relative to the path will be executed. A flow is considered a test flow if it is inherited from core/testrunner/testinterface. The path is relative to the root of the project.",
        "required": true
      },
      "options": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Timeout for each test in milliseconds. Defaults to 30000 (30 seconds) if not specified."
          },
          "parallel": {
            "title" :"parallel?",
            "type": "boolean",
            "description": "When set, invokes the tests in parallel.",
            "format" : "plain"
          },
          "limit": {
            "title" :"parallel limit",
            "type": "integer",
            "description": "Max number of parallel tests to be run."
          },
          "scanDepth": {
            "type": "number",
            "description": "The number of levels deep to scan for test flows. Defaults to 0 if not specified."
          }
        }
      }
    }
  },
  "output-schema": {
    "type": "object",
    "properties": {
      "success": {
        "type": "boolean"
      },
      "totalTests": {
        "type": "number"
      },
      "totalFailed": {
        "type": "number"
      },
      "report": {
        "type": "object",
        "properties": {
          "all": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "failed": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "file": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "meta": {
    "name": "runTests",
    "description": "Run all test flows under a specified folder. A flow is considered as a test if it inherits the interface core/testrunner/testinterface."
  }
}
