首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure管道自定义任务信息日志被视为错误

Azure管道自定义任务信息日志被视为错误
EN

Stack Overflow用户
提问于 2021-03-21 18:32:21
回答 1查看 73关注 0票数 0

我已经开发了一个执行nightwatch.js测试用例的azure自定义管道任务(构建和发布)。

当连接到chrome时,nightwatch会生成一个信息日志(如下图所示)。但是,这些日志被认为是管道中的错误,并且自定义任务显示为失败(参见第二个图像)。有没有什么办法可以抑制来自nightwatch.js的信息日志?

Task.json代码

代码语言:javascript
复制
{
    "$schema": "https://raw.githubusercontent.com/Microsoft/azure-pipelines-task-lib/master/tasks.schema.json",
    "id": "c786b1f1-37f1-44d6-ba55-5abe126bb031",
    "name": “CustomTaskName”,
    "friendlyName": "CustomTaskName Friendly Name,
    "description": “desc”,
    "helpMarkDown": "",
    "category": "Utility",
    "author": "Chandan",
    "version": {
        "Major": 0,
        "Minor": 1,
        "Patch": 0
    },
    "instanceNameFormat": "Echo $(url)",
    "inputs": [
        {
            "name": "url",
            "type": "string",
            "label": "URL of your website",
            "defaultValue": "",
            "required": true,
            "helpMarkDown": "URL of your website which needs testing"
        }
    ],
    "execution": {
        "PowerShell": {
            "target": "$(currentDirectory)\\command.ps1",
            "argumentFormat": "",
            "workingDirectory": ""
        }
    }
}
EN

回答 1

Stack Overflow用户

发布于 2021-03-22 16:06:58

您可以尝试在nightwatch.conf.js配置文件中添加slient: true

代码语言:javascript
复制
  live_output: false,
  silent: true,
  output: true,
  detailed_output: false,
  disable_error_log: false,

您可以在官方document的输出设置部分找到相关详细信息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66731250

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档