2012-10-17 2 views
1

Jenkins의 "Execute shell"명령에 perl 스크립트를 추가했습니다. 이 Perl 스크립트는 js 테스트를 실행하기 위해 명령 행을 통해 Instruments를 시작합니다 (우리는 tuneup_js 프레임 워크를 사용합니다). 스크립트가 테스트 중 하나를 통계 할 때, 젠킨 콘솔 출력은 장비가 출력하는 것과 완전히 다릅니다. 젠킨스 콘솔에 의해 주어진 출력은 아래를 참조하십시오 :Jenkins를 통해 UI 자동화 실행

Oct 17 15:06:03 macserver.local instruments[7197] <Error>: CGImageCreateWithImageProvider: invalid image size: 0 x 0. 
2012-10-17 15:08:10.312 ScriptAgent[13266:13403] actionSheet:<UIAActionSheet_0x7c41ab0 uiaxElement=0x7c41a30 AXUIElementRef=0x7c41940> 
2012-10-17 15:08:10.316 ScriptAgent[13266:13403] actionSheet:<UIAActionSheet_0xaa28be0 uiaxElement=0x7c41a30 AXUIElementRef=0x7c41940> 
2012-10-17 15:08:10.320 ScriptAgent[13266:13403] actionSheet:<UIAActionSheet_0xaa2a5d0 uiaxElement=0x7c41a30 AXUIElementRef=0x7c41940> 
2012-10-17 15:08:10.324 ScriptAgent[13266:13403] actionSheet:<UIAActionSheet_0xa4274e0 uiaxElement=0x7c41a30 AXUIElementRef=0x7c41940> 
2012-10-17 15:08:10.328 ScriptAgent[13266:13403] actionSheet:<UIAActionSheet_0x7c433a0 uiaxElement=0x7c41a30 AXUIElementRef=0x7c41940> 
2012-10-17 15:08:10.332 ScriptAgent[13266:13403] actionSheet:<UIAActionSheet_0x7c43c50 uiaxElement=0x7c41a30 AXUIElementRef=0x7c41940> 
2012-10-17 15:08:10.335 ScriptAgent[13266:13403] actionSheet:<UIAActionSheet_0x7c44d90 uiaxElement=0x7c41a30 AXUIElementRef=0x7c41940> 
2012-10-17 15:08:10.339 ScriptAgent[13266:13403] actionSheet:<UIAActionSheet_0x7c43340 uiaxElement=0x7c41a30 AXUIElementRef=0x7c41940> 
2012-10-17 15:08:10.343 ScriptAgent[13266:13403] actionSheet:<UIAActionSheet_0x7c45ab0 uiaxElement=0x7c41a30 AXUIElementRef=0x7c41940> 

내가 시뮬레이터에서 완벽하게 실행 테스트를 볼 수 있습니다.

2012-10-17 21:10:32 +0000 Start: 
2012-10-17 21:10:32 +0000 Pass: 
2012-10-17 21:10:32 +0000 Start: 
2012-10-17 21:10:32 +0000 Issue: 
2012-10-17 21:10:32 +0000 Issue: 
2012-10-17 21:10:32 +0000 Pass: 
2012-10-17 21:10:32 +0000 Start: 
2012-10-17 21:10:32 +0000 Debug: target.setDeviceOrientation("3") 
2012-10-17 21:10:33 +0000 Issue: 
2012-10-17 21:10:33 +0000 Debug: target.setDeviceOrientation("1") 
2012-10-17 21:10:35 +0000 Debug: target.frontMostApp().mainWindow().scrollViews()[0].buttons()["t"].tap() 
2012-10-17 21:10:36 +0000 Debug: target.setDeviceOrientation("3") 
2012-10-17 21:10:38 +0000 Issue: 

내가 위의 출력과 비슷한 콘솔 무언가의 출력을 원하는 : 나는 악기를 통해 동일한 테스트를 실행하면 내 출력은 같을 것입니다. 이것이 가능한가?

답변

0

나는 마침내 작동하도록했습니다!

문제는 테스트를 실행중인 펄 스크립트에 있습니다.

system ($ command)을 사용하는 대신 back tick 연산자를 사용했습니다.

왜 백틱 운영자가 출력을 반환하지 않으며 왜 system()이 여기서 작동하는지 알지 못합니다.

+0

stdout과 stderr의 차이점은 무엇입니까? – Richard