You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am executing some tests where i am expected to upload pdf/excel files (Single/multiple). I am using the file from project repository itself and it works perfectly on local execution.
But when executing the same test on Azure pipeline(test run on a linux machine), the test does not give any error, but the file also does not get uploaded. Please help.
static async uploadFileService(request:APIRequestContext,filePath:string[], newFileName:string[], fileType:FileType) {
const form = new FormData();
for (let index = 0; index < filePath.length; index++) {
const fileBuffer = FS.readFileSync(filePath[index]);
form.append('file', new File([fileBuffer],newFileName[index],{ type: 'application/octet-stream' }));
}
const headers:any = await HeaderDataClient.getHeadersUploadFile();
var baseURL = process.env.ENV_VAR_VAR==='qa'?
"BASE_URL_QA":
"BASE_URL_UAT";
const response = await request.post(baseURL + resource, {
headers: headers,
multipart: form
});
return response;
}
In all cases, files upload locally, but when executing the same code on Azure pipeline (runs on linux machine) , the loader for file upload keeps rotating, but the file does not load and the test times out.
For case 1 and 2, i.e. UI uploads, No errors appear in log.
For case 3, ie API , i ma getting 'apiRequestContext.post: connect ETIMEDOUT'
The text was updated successfully, but these errors were encountered:
abhay2506Singh
changed the title
Issue with uploading file on a web browser while running test on an Azure agent machine
Issue with uploading file on a web browser while running test on an Azure pipeline
Jan 10, 2025
I am executing some tests where i am expected to upload pdf/excel files (Single/multiple). I am using the file from project repository itself and it works perfectly on local execution.
But when executing the same test on Azure pipeline(test run on a linux machine), the test does not give any error, but the file also does not get uploaded. Please help.
Element :
<input _ngcontent-ehr-c4="" multiple="" style="display: none;" type="file">
Code variations tried:
In all cases, files upload locally, but when executing the same code on Azure pipeline (runs on linux machine) , the loader for file upload keeps rotating, but the file does not load and the test times out.
For case 1 and 2, i.e. UI uploads, No errors appear in log.
For case 3, ie API , i ma getting 'apiRequestContext.post: connect ETIMEDOUT'
The text was updated successfully, but these errors were encountered: