@@ -6,6 +6,7 @@ import path from 'node:path';
66import FormData from 'form-data' ;
77import TestingBotError from '../models/testingbot_error' ;
88import XCUITestOptions from '../models/xcuitest_options' ;
9+ import utils from '../utils' ;
910
1011export default class XCUITest {
1112 private readonly URL = 'https://api.testingbot.com/v1/app-automate/xcuitest' ;
@@ -64,7 +65,7 @@ export default class XCUITest {
6465 logger . info ( 'Running XCUITests' ) ;
6566 await this . runTests ( ) ;
6667 } catch ( error ) {
67- logger . error ( error ) ;
68+ logger . error ( error instanceof Error ? error . message : error ) ;
6869 }
6970 }
7071
@@ -78,6 +79,7 @@ export default class XCUITest {
7879 headers : {
7980 'Content-Type' : 'application/octet-stream' ,
8081 'Content-Disposition' : `attachment; filename=${ fileName } ` ,
82+ 'User-Agent' : utils . getUserAgent ( ) ,
8183 } ,
8284 auth : {
8385 username : this . credentials . userName ,
@@ -106,8 +108,9 @@ export default class XCUITest {
106108 formData ,
107109 {
108110 headers : {
109- 'Content-Type' : 'application/zip, ' ,
111+ 'Content-Type' : 'application/zip' ,
110112 'Content-Disposition' : `attachment; filename=${ fileName } ` ,
113+ 'User-Agent' : utils . getUserAgent ( ) ,
111114 } ,
112115 auth : {
113116 username : this . credentials . userName ,
@@ -138,6 +141,7 @@ export default class XCUITest {
138141 {
139142 headers : {
140143 'Content-Type' : 'application/json' ,
144+ 'User-Agent' : utils . getUserAgent ( ) ,
141145 } ,
142146 auth : {
143147 username : this . credentials . userName ,
0 commit comments