我发现React Native有两个UI组件,它们主要使用.我想用其中一个.哪一个更容易使用和可定制?
我想知道watir-webdriver是否能够记录任何控制台错误的输出?这相当于在浏览器中手动打开控制台并在页面加载时查看JS错误.我可以通过watir-webdriver和日志/错误捕获这个吗?
我有一个这样的页面:
<input type="button" onclick="confirm('confirm popup');" value="click" />
Run Code Online (Sandbox Code Playgroud)
当我转到页面并单击链接时:
require "watir-webdriver"
browser = Watir::Browser.new
browser.goto "page.html"
browser.button.click
Run Code Online (Sandbox Code Playgroud)
确认弹出窗口出现.我可以解雇它:
require "watir-webdriver/extensions/alerts"
browser.confirm(true) {browser.button(:value => 'Confirm').click}
Run Code Online (Sandbox Code Playgroud)
但我收到此错误消息:
[remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/command_processor.js:10302:in `unknown': Modal dialog present (Selenium::WebDriver::Error::UnhandledAlertError)
from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/driver-component.js -> file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/dispatcher.js:85:in `unknown'
from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/driver-component.js -> file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/dispatcher.js:516:in `unknown'
from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/driver-component.js -> file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/dispatcher.js:351:in `unknown'
from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/driver-component.js -> file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/webdriverserver.js:47:in `unknown'
from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:1935:in `unknown'
from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:2261:in `unknown'
from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:1168:in `unknown'
from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:1616:in `unknown' …
Run Code Online (Sandbox Code Playgroud) 我有一个单元测试(例子是修改Test :: Unit文档)
require 'test/unit'
class TC_MyTest < Test::Unit::TestCase
def test_something
assert(true)
end
end
Run Code Online (Sandbox Code Playgroud)
当我执行它时,我得到:
Loaded suite C:/test
Started
.
Finished in 0.0 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
Run Code Online (Sandbox Code Playgroud)
我想得到这样的东西(test_something
输出):
Loaded suite C:/test
Started
test_something
.
Finished in 0.0 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
Run Code Online (Sandbox Code Playgroud) 我在Hudson创建了自由式软件项目.
我想克隆一个公共Git存储库:git://github.com/bret/watir.git
构建失败并显示错误消息:
Started by user anonymous
Checkout:workspace / C:\Documents and Settings\Administrator\.hudson\jobs\watir\workspace - hudson.remoting.LocalChannel@1a1f370
Last Build : #4
Checkout:workspace / C:\Documents and Settings\Administrator\.hudson\jobs\watir\workspace - hudson.remoting.LocalChannel@1a1f370
Cloning the remote Git repository
Cloning repository origin
$ git clone -o origin git://github.com/bret/watir.git "C:\Documents and Settings\Administrator\.hudson\jobs\watir\workspace"
Trying next repository
ERROR: Could not clone from a repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:400)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:358)
at hudson.FilePath.act(FilePath.java:676)
at hudson.FilePath.act(FilePath.java:660)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:358)
at hudson.model.AbstractProject.checkout(AbstractProject.java:833)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:314)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:266)
at hudson.model.Run.run(Run.java:948)
at …
Run Code Online (Sandbox Code Playgroud) 我在这里找到了一个关于软件开发博客的问题,但我想知道哪个博客关于这个社区的软件测试.
如果您只需要推荐多个博客,请将每个博客分别发布在单独的答案中,以便其他人可以在特定博客上投票.:)
谢谢!
编辑:我对聚合其他博客的网站不感兴趣,因为@Alan说(在他的回答中)那里有好的和不那么好的博客.
我有这样的HTML:
<input custom_attribute="so cool" type="text" />
Run Code Online (Sandbox Code Playgroud)
我想获得custom_attribute
使用Watir的价值.
我正在通过命令行运行hudson.war.它以我的默认语言portuguese启动界面.我怎样才能换成英文?
Jenkins本机Mac OS软件包默认安装在/Users/Shared/Jenkins
和战争中/Applications/Jenkins
.它作为守护进程运行,并且尽管有kill -9
命令也会自动重启.
我用一个道具添加了一个winstone.properties
in ./Applications/Jenkins
httpPort=9999
仍然应用程序从8080开始.
我甚至安装了CLI并试过:
java -jar jenkins-cli.jar -s http://127.0.0.1:8080/ shutdown
Failed to authenticate with your SSH keys. Proceeding with anonymous access
Sep 19, 2011 1:11:00 PM hudson.remoting.Channel$ReaderThread run
SEVERE: I/O error in channel CLI connection to http://127.0.0.1:8080/
java.io.IOException: Unexpected termination of the channel
at hudson.remoting.Channel$ReaderThread.run(Channel.java:1093)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2553)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1296)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at hudson.remoting.Channel$ReaderThread.run(Channel.java:1087)
Exception in thread "main" hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the …
Run Code Online (Sandbox Code Playgroud) 我希望有人可以帮助我解决我在运行黄瓜测试时遇到的问题.
我收到以下错误:
Timeout::Error (Timeout::Error)
C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill'
C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill'
C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1293:in `request'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:745:in `start'
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1284:in `request'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/default.rb:82:in `response_for'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/default.rb:38:in `request'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:598:in `raw_execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:576:in `execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:242:in `getScreenshot'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb:34:in `screenshot_as'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb:18:in `block in save_screenshot'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb:18:in `open'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb:18:in `save_screenshot'
Run Code Online (Sandbox Code Playgroud)
有没有人知道是什么原因造成的?
在我的测试套件执行期间随机发生此错误.在套件中我会有150个场景,我看到这个错误发生在不同的阶段.例如,可能发生在方案50或方案100中.我通过Jenkins的rake文件或通过cmd窗口运行我的测试但是如果我使用任何一种方法都会发生错误.
我们这里的测试站点可能有点奇怪,而且这里有一个奇怪的超时,可能会有所期待.但是,一旦此错误开始发生,从测试中发生的所有其他测试发生错误将具有相同的问题.我的场景都不依赖于彼此.每个场景通常都以一个步骤开始I go to the homepage
- 在.rb
我已经@browser.cookies.clear
包含的文件中的这个步骤中,因此前一个场景中不应该剩下任何数据.
有没有其他人遇到这个,如果是这样你采取了什么步骤来排序它?
watir ×3
hudson ×2
jenkins ×2
blogs ×1
clone ×1
confirm ×1
cucumber ×1
git ×1
html ×1
javascript ×1
native-base ×1
popup ×1
react-native ×1
reactjs ×1
ruby ×1
shoutem ×1
testing ×1
testunit ×1
unit-testing ×1