0

I have developed an azure custom pipeline task (Build and Release) that executes nightwatch.js test cases.

nightwatch generates an INFO log while connecting to chrome (As Shown in the first image below). However, these logs are considered as errors in the pipleline and the custom task is shown as failure (refer 2nd image). Is there anyway I can supress INFO logs from nightwatch.js

INFO log when nightwatch is executed

PipeLine error

Task.json code

{
    "$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": ""
        }
    }
}
IamChandu
  • 355
  • 6
  • 18

1 Answers1

0

You can try to add slient: true to nightwatch.conf.js config file.

  live_output: false,
  silent: true,
  output: true,
  detailed_output: false,
  disable_error_log: false,

You can find relevant details available under Output Settings section of official document.

enter image description here

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
  • I updated nightwatch.conf.js under test_settings. Still it didn't work desiredCapabilities: { browserName : 'chrome', silent: true, live_output: false, output: true, detailed_output: false, disable_error_log: false } – IamChandu Mar 23 '21 at 03:32