설정에 어떤 문제가 있는지 잘 모르겠습니다. 로봇 테스트는 최근에 추가되었으며 다른 개발자의 OS X 시스템에서 성공적으로 실행되는 것을 확인했습니다.
Plone과 Firefox가 설치된 Ubuntu 시스템에서 동일한 로봇 테스트를 실행하려고합니다. 패키지는 https://github.com/collective/collective.academicprogrammes입니다.
plone.app.robotframework를 내 develop.cfg 파일의 [test] 섹션에 추가해야했습니다. 이것이 내 develop.cfg의 모습입니다.
[출처]
Collective.academicprogrammes = git [email protected] : collective / collective.academicprogrammes.git
[빌드 아웃]
테스트 패키지 = Collective.academicprogrammes [테스트]
extends = buildout.cfg
확장 프로그램 + = mr.developer
계란 + =
Products.DocFinderTab plone.reload collective.academicprogrammes
부품 + =
test diazotools zopeskel robot
항상 체크 아웃 = 소스 강제 = 소스 자동 체크 아웃 = *
[테스트]
레시피 = zc.recipe.testrunner
기본값 = [ '--exit-with-status', '--auto-color', '--auto-progress']
계란 =
${buildout:eggs} ${buildout:test-packages}
[조페 스켈]
레시피 = zc.recipe.egg
계란 =
ZopeSkel Paste PasteDeploy PasteScript zopeskel.diazotheme zopeskel.dexterity zest.releaser ${buildout:eggs}
[로봇]
레시피 = zc.recipe.egg
계란 =
Pillow ${test:eggs} plone.app.robotframework
실행 bin/buildout -c develop.cfg
하려고 한 모든 것을 설치하기 위해 실행 한 후 bin/test -t robot
다음 오류가 발생합니다.
lxml.etree._ParserContext._handleParseResultDoc의 파일 "parser.pxi", 569 행 (src / lxml / lxml.etree.c : 74567) 파일 "parser.pxi", 650 행, lxml.etree._handleParseResult (src / lxml / lxml.etree.c : 75458) 파일 "parser.pxi", 590 행, lxml.etree._raiseParseError (src / lxml / lxml.etree.c : 74791)
파일 "lxml.etree.pyx", 2756 행, lxml.etree.fromstring (src / lxml / lxml.etree.c : 54726) bash : 예기치 않은 토큰 근처의 구문 오류
(' (precise)david@localhost:~/Plone/zeocluster$ File "parser.pxi", line 1571, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:82792) bash: syntax error near unexpected token ... File "parser.pxi", line 1450, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:81590) bash: syntax error near unexpected token
( '
그리고 다음과 같이 끝납니다.
AssertionError : 설치 실패 : WebDriverException : 메시지 : '프로필을로드 할 수 없습니다. 프로필 디렉터리 : / tmp / tmpqsX6Ky / webdriver-py-profilecopy Firefox 출력 : Gtk-Message : "canberra-gtk-module"모듈을로드하지 못했습니다. \ n *** LOG addons.xpi : startup \ n *** LOG addons. xpi : checkForChanges \ n *** LOG addons.xpi : 변경 사항 없음 \ n * * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * **\ n * xpconnect 래핑 된 JSObject 호출에서 다음 오류가 발생했습니다. * \ n [예외 ... "\ '[JavaScript 오류 :"this.updateDisplay는 함수가 아닙니다. "{file :"chrome : // browser / content / search / search.xml "줄 : 83}] \ '메서드 호출시 : [nsIBrowserSearchInitObserver :: onInitComplete]"nsresult : "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"위치 : "JS 프레임 :: resource : //gre/components/nsSearchService.js :: onSuccess :: line 3257 "data : yes] \ n * * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** * ** \ n '
오류는 두 가지입니다. 하나는 모든 종속성을 포함하지 않는 경량 Linux OS를 설치했다는 사실과 관련이 있습니다. 특히 libcanberra를 설치해야했습니다. Ubuntu에서이를 수행하기 위해 'sudo apt-get install libcanberra-gtk-module'명령을 실행했습니다. canberra-gtk-module에 대한 오류를 수정하기에 충분했습니다.
두 번째 문제는 사용 된 Firefox 버전과 관련이 있습니다. Selenium 2.34는 Firefox 27 (내가 사용하고있는 브라우저)과 호환되지 않습니다. 참조 : http://selenium.googlecode.com/git/py/CHANGES
두 가지 옵션이 있습니다. Selenium을 2.40.0으로 업그레이드하십시오.
또는
Firefox 25에 대해 로봇 브라우저 테스트를 실행합니다.
나는 Firefox 25를 얻고 테스트를 실행할 때 사용하기로 결정했습니다.
이 문제에 대한 관련 정보는 다음에서 찾을 수 있습니다.
http://seleniumsimplified.com/problems-running-webdriver-on-firefox-26/
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다