我开发了一个执行 nightwatch.js 测试用例的天蓝色自定义管道任务(构建和发布)。
nightwatch 在连接到 chrome 时生成一个 INFO 日志(如下面的第一张图片所示)。但是,这些日志被视为管道中的错误,并且自定义任务显示为失败(请参阅第二张图片)。无论如何我可以从 nightwatch.js 中抑制 INFO 日志
Task.json 代码
{
"$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": ""
}
}
}