Ruby-Capybara不起作用的Parallel_tests
使用Capybara进行简单的登录自动化测试。没有使用数据库。 我正在尝试使用parallel_test GEM同时调用多个测试会话(Chrome浏览器)使用以下命令
parallel_rspec -n 2
调用了两个浏览器,但只有第一个浏览器使用正确的URL启动第二个只是空白。同样,在第一个浏览器输入字段中,登录值和密码值两次(数据碰撞)串联。
框架 - 非轨道。带有Capybara Spec_file的Ruby
config/database.yml
test: &TEST
adapter: postgresql
host: localhost
database: test_db<%= ENV['TEST_ENV_NUMBER'] %>
encoding: utf8
username: postgres
password: postgres
-1
describe '' do
it '' do
ENV['TEST_ENV_NUMBER'] = ''
end
end
Spec_file -2
describe '' do
it '' do
ENV['TEST_ENV_NUMBER'] = '2'
end
end
两个Spec文件在同一文件夹中,
非误差设置的指导很少。任何帮助都将不胜感激。
Running a simple login automation test using Capybara. No database is used.
I am trying to use parallel_test gem to invoke multiple test sessions at the same time (chrome browser) using the following command
parallel_rspec -n 2
two browsers are invoked but only the first one is launched with the correct URL and the second one is simply blank. Also, the login and password values are concatenated twice (data collision) in the first browser input fields.
Framework - Non-rails. Ruby with capybara
config/database.yml
test: &TEST
adapter: postgresql
host: localhost
database: test_db<%= ENV['TEST_ENV_NUMBER'] %>
encoding: utf8
username: postgres
password: postgres
spec_file - 1
describe '' do
it '' do
ENV['TEST_ENV_NUMBER'] = ''
end
end
spec_file - 2
describe '' do
it '' do
ENV['TEST_ENV_NUMBER'] = '2'
end
end
both spec files are in the same folder
There is very little guidance for nonrails setup. Any help would be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论