private async uploadResultsToPipeline()

in src/RunnerFiles/CreateAndRunTest.ts [279:304]


    private async uploadResultsToPipeline(testRunObj: TestRunModel) : Promise<void> {
        let testResultUrl = Util.getResultFolder(testRunObj.testArtifacts);
        if(testResultUrl != null) {
            const response = await FetchUtil.httpClientRetries(testResultUrl,{},FetchCallType.get,3,"");
            if (response.message.statusCode != 200) {
                let respObj:any = await Util.getResultObj(response);
                console.log(respObj ? respObj : Util.errorCorrection(response));
                throw new Error("Error in fetching results ");
            }
            else {
                await FileUtils.uploadFileToResultsFolder(response, resultZipFileName);
            }
        }
        let testReportUrl = Util.getReportFolder(testRunObj.testArtifacts);
        if(testReportUrl != null) {
            const response = await FetchUtil.httpClientRetries(testReportUrl,{},FetchCallType.get,3,"");
            if (response.message.statusCode != 200) {
                let respObj:any = await Util.getResultObj(response);
                console.log(respObj ? respObj : Util.errorCorrection(response));
                throw new Error("Error in fetching report ");
            }
            else {
                await FileUtils.uploadFileToResultsFolder(response, reportZipFileName);
            }
        }
    }