小编fer*_*i2k的帖子

詹金斯无权复制文件 - 或者是吗?

我在jenkins中有一个奇怪的问题,我无法在作业中复制文件,但是,在命令行上使用jenkins用户,我可以毫无问题地执行此操作.

我在用户"jenkins"下使用jenkins运行debian.

我将用户"jenkins"添加到"www-data"组中,这样我就可以将文件复制到apache的www文件夹中.

目标文件夹的文件夹权限如下所示:

drwxrwxr-x 9 www-data www-data 4096 Jun 23 16:19 .   
drwxrwxr-x 4 www-data www-data 4096 Jun 23 12:45 ..  
-rw-rw-r-- 1 volker   www-data  368 Jun 23 17:10 about.php  
-rw-rw-r-- 1 volker   www-data  366 Jun 23 17:10 bio.php  
-rw-rw-r-- 1 volker   www-data  370 Jun 23 17:10 contact.php   
drwxrwxr-x 3 volker   www-data 4096 Jun 23 16:19 content  
drwxrwxr-x 3 volker   www-data 4096 Jun 23 16:19 css  
drwxrwxr-x 8 volker   www-data 4096 Jun 23 16:19 default  
drwxrwxr-x 3 volker   www-data …
Run Code Online (Sandbox Code Playgroud)

jenkins

9
推荐指数
1
解决办法
7515
查看次数

自动运行硒测试

我有Selenium的问题,无法让它工作.
我想做什么:
我们的客户向我们发送了一个Selenium测试用例,该测试用例将在多个位置自动执行,并记录所用的时间.我们希望使用Selenium和Firefox Portable,因为我们希望测试完全独立于任何用户输入和不同位置的已安装软件.对于起始条件来说太多了;)
到目前为止我们做了什么:
第一个版本完全用Java编写,我们使用Selenium IDE插件 - >导出到Java WebDriver将测试用例从客户导出到Java.这不能再做了,因为客户现在使用WebDriver导出不支持的一些功能.由于我们不想改变客户的测试,因此Java导出不再是一种选择.
因此,对于第一次运行,我们使用此命令(正确设置任何变量):

java -jar selenium-2.33.0/selenium-server-standalone-2.33.0.jar -port 5555 
-firefoxProfileTemplate "Firefox\Data\profile" -log logs\selenium_server.log 
-htmlSuite "*firefox" http://localhost:5555 Testsuite.html
logs\results-firefox-%curTimestamp%.html
Run Code Online (Sandbox Code Playgroud)

这启动了我预装的firefox,而不是便携式的.在客户机器上,没有启动任何firefox,因为它没有安装.所以我不得不使用"自定义"htmlSuite提供firefox的路径:

java -jar selenium-2.33.0/selenium-server-standalone-2.33.0.jar -port 5555 
-firefoxProfileTemplate "Firefox\Data\profile" -log logs\selenium_server.log 
-htmlSuite "*custom %FF_DIR%\FirefoxPortable.exe" http://localhost:5555 Testsuite.html 
logs\results-firefox-%curTimestamp%.html
Run Code Online (Sandbox Code Playgroud)

这不起作用,因为如果在Windows下运行,Selenium Server无法执行此命令(请参阅:http://code.google.com/p/selenium/issues/detail?id = 3274)作为评论#6有一些差异,我们修补了selenium Server独立Jar并再次运行测试.现在可以启动浏览器,但无法运行测试.加载第一页后,我们得到错误"权限被拒绝访问属性'文档'".
这里的解决方案表明,用户权限问题可能是原因,您应该尝试"chrome"htmlSuite(请参阅:https://sqa.stackexchange.com/questions/1453/how-to-fix-permission-denied- to-access-property-document)所以我们做了:

java -jar selenium-2.33.0/selenium-server-standalone-2.33.0-patched.jar 
-port 5555 -firefoxProfileTemplate "FirefoxPortable\Data\profile" 
-log logs\selenium_server.log -htmlSuite "*chrome %FF_DIR%\FirefoxPortable.exe" 
http://localhost:5555 Testsuite.html logs\results-firefox-%curTimestamp%.html
Run Code Online (Sandbox Code Playgroud)

请注意我们的"修补"硒和"chrome"htmlSuite.这也行不通.所以,简而言之就是结果:

selenium

3
推荐指数
1
解决办法
7770
查看次数

标签 统计

jenkins ×1

selenium ×1