ERROR on BrowserStack Results task: Build not found by name

Mauro Sanchez 0 Reputation points
2024-07-22T15:07:39.9566667+00:00

When running tests on Azure pipeline I get the following error for the BrowserStack Results task: Build not found by name. This is for automated tests running Playwright using Typescript.

I tried adding the buildName variable in different places but I cant find the right place to place it in my code.

Not sure if related, but I get the warning ' Can't find loc string for key: Info_GotAndMaskAuth' when running npm custom task

Capture2

Capture

playwright.config.ts

import { defineConfig, devices } from '@playwright/test';

import { config } from 'dotenv';

const defaultEnv = process.env.ENV_VARS || 'qa';

const buildName = process.env.BROWSERSTACK_BUILD_NAME;

config({

path: `./env/.env.${defaultEnv}`, // or '.env'

});

require('dotenv').config();

export default defineConfig({

metadata: {

actionTimeout: 1000, // The maximum time for running a single action (in milliseconds).

shortTimeout: 3000,

mediumTimeout: 30000,

longTimeout: 40000,

veryLongTimeout: 50000

},

testDir: './tests',

/* Run tests in files in parallel */

fullyParallel: true,

/* Fail the build on CI if you accidentally left test.only in the source code. */

forbidOnly: !!process.env.CI,

/* Retry on CI only */

retries: process.env.CI ? 1 : 0,

/* Opt out of parallel tests on CI. */

workers: process.env.CI ? 1 : undefined,

/* Reporter to use. See https://playwright.dev/docs/test-reporters */

reporter: [['html', { open: 'never' }], ["line"], ['list', { printSteps: true }], ['json', { outputFile: 'test-results.json' }], ['junit', { outputFile: 'results.xml' }]],

/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */

use: {

/* Base URL to use in actions like `await page.goto('/')`. */

// baseURL: 'http://127.0.0.1:3000',

baseURL: '',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */

trace: 'on',

screenshot: 'on',

video: 'on',

actionTimeout: 5000

},

timeout: 0,

/* Configure projects for major browsers */

projects: [

{

name: 'chromium',

use: {

...devices['Desktop Chrome'],

}

},

],

});

2024-07-22T16:31:13.7669932Z ##[debug]Evaluating condition for step: 'BrowserStack Results.'

2024-07-22T16:31:13.7672186Z ##[debug]Evaluating: succeeded()

2024-07-22T16:31:13.7672559Z ##[debug]Evaluating succeeded:

2024-07-22T16:31:13.7673601Z ##[debug]=> True

2024-07-22T16:31:13.7674296Z ##[debug]Result: True

2024-07-22T16:31:13.7675096Z ##[section]Starting: BrowserStack Results.

2024-07-22T16:31:14.0459711Z ==============================================================================

2024-07-22T16:31:14.0459910Z Task : BrowserStack Results

2024-07-22T16:31:14.0459993Z Description : This task helps in showing BrowserStack results.

2024-07-22T16:31:14.0460131Z Version : 1.1.1

2024-07-22T16:31:14.0460203Z Author : BrowserStack

2024-07-22T16:31:14.0460359Z Help :

2024-07-22T16:31:14.0460418Z ==============================================================================

2024-07-22T16:31:14.0899651Z ##[debug]Using node path: D:\Agents-CloudUI\C201MK27-UI-01\externals\node\bin\node.exe

2024-07-22T16:31:14.7427767Z ##[debug]agent.TempDirectory=D:\Agents-CloudUI\C201MK27-UI-01\_work\_temp

2024-07-22T16:31:14.7466626Z ##[debug]loading inputs and endpoints

2024-07-22T16:31:14.7474077Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN

2024-07-22T16:31:14.7573886Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION

2024-07-22T16:31:14.7581044Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION

2024-07-22T16:31:14.7587576Z ##[debug]loading INPUT_BROWSERSTACKPRODUCT

2024-07-22T16:31:14.7601044Z ##[debug]loaded 4

2024-07-22T16:31:14.7634656Z ##[debug]Agent.ProxyUrl=undefined

2024-07-22T16:31:14.7636390Z ##[debug]Agent.CAInfo=undefined

2024-07-22T16:31:14.7636727Z ##[debug]Agent.ClientCert=undefined

2024-07-22T16:31:14.7637060Z ##[debug]Agent.SkipCertValidation=undefined

2024-07-22T16:31:15.1868759Z ##[debug]browserstackProduct=automate

2024-07-22T16:31:15.1869690Z ##[debug]BROWSERSTACK_USERNAME=***-azure

2024-07-22T16:31:15.1870140Z ##[debug]BROWSERSTACK_ACCESS_KEY=***

2024-07-22T16:31:15.1870603Z ##[debug]BROWSERSTACK_CONNECTED_SERVICE_NAME=7be27815-2703-424c-8f71-c8a41b6beca1

2024-07-22T16:31:15.1871756Z ##[debug]BROWSERSTACK_BUILD_NAME=azure-IRef.AutomatedTests - POC - BS-829099

2024-07-22T16:31:15.1885447Z Publishing reports for Build azure-IRef.AutomatedTests - POC - BS-829099 on automate...

2024-07-22T16:31:15.1976676Z (node:35996) Warning: Use Cipheriv for counter mode of aes-256-ctr

2024-07-22T16:31:15.1977013Z (node:35996) Warning: Use Cipheriv for counter mode of aes-256-ctr

2024-07-22T16:31:15.1977245Z (node:35996) Warning: Use Cipheriv for counter mode of aes-256-ctr

2024-07-22T16:31:15.1977454Z (node:35996) Warning: Use Cipheriv for counter mode of aes-256-ctr

2024-07-22T16:31:15.4463260Z ##[debug]task result: Failed

2024-07-22T16:31:15.4464441Z ##[error] Build not found by name: "azure-IRef.AutomatedTests - POC - BS-829099"

2024-07-22T16:31:15.4465165Z ##[debug]Processed: ##vso[task.issue type=error;] Build not found by name: "azure-IRef.AutomatedTests - POC - BS-829099"

2024-07-22T16:31:15.4466341Z ##[debug]Processed: ##vso[task.complete result=Failed;] Build not found by name: "azure-IRef.AutomatedTests - POC - BS-829099"

2024-07-22T16:31:15.4610708Z ##[section]Finishing: BrowserStack Results.


Community Center | Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,641 Reputation points Moderator
    2024-07-26T04:19:38.66+00:00

    @Mauro Sanchez - Thanks for the question and using MS Q&A platform.

    Azure DevOps is currently not supported in the Microsoft Q&A platform; the supported products are listed over here https://docs.microsoft.com/en-us/answers/products (more to be added later on).

    In order to assist best on your query, I would request you to post your query in SO => Azure Devops dedicated support. Additionally, adding the [Azure] tag on SO will increase visibility as it is a Microsoft Sponsored tag.

    https://stackoverflow.com/questions/tagged/azure-devops

    OR

    Report any Azure Devops problems on Developer Community.

    This will assist you with a faster reply to your query.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.