- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我尝试使用ElasticSearch访问页面时,我不确定为什么我的Cucumber测试失败了。我假设它与 capybara 如何运行页面有关。如果有帮助,我正在使用Poltergeist。
这是完整的痕迹:
400 : {"error":"SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[qMOd6ozIREy-7dO8R5Kp6Q][businesses_test][4]: SearchParseException[[businesses_test][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"dis_max\":{\"queries\":[{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search2\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search2\"}}]}},\"size\":100000,\"from\":0,\"fields\":[]}]]]; nested: QueryParsingException[[businesses_test] [match] analyzer [searchkick_search] not found]; }{[qMOd6ozIREy-7dO8R5Kp6Q][businesses_test][3]: SearchParseException[[businesses_test][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"dis_max\":{\"queries\":[{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search2\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search2\"}}]}},\"size\":100000,\"from\":0,\"fields\":[]}]]]; nested: QueryParsingException[[businesses_test] [match] analyzer [searchkick_search] not found]; }{[qMOd6ozIREy-7dO8R5Kp6Q][businesses_test][1]: SearchParseException[[businesses_test][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"dis_max\":{\"queries\":[{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search2\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search2\"}}]}},\"size\":100000,\"from\":0,\"fields\":[]}]]]; nested: QueryParsingException[[businesses_test] [match] analyzer [searchkick_search] not found]; }{[qMOd6ozIREy-7dO8R5Kp6Q][businesses_test][2]: SearchParseException[[businesses_test][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"dis_max\":{\"queries\":[{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search2\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search2\"}}]}},\"size\":100000,\"from\":0,\"fields\":[]}]]]; nested: QueryParsingException[[businesses_test] [match] analyzer [searchkick_search] not found]; }{[qMOd6ozIREy-7dO8R5Kp6Q][businesses_test][0]: SearchParseException[[businesses_test][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"dis_max\":{\"queries\":[{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"boost\":10,\"analyzer\":\"searchkick_search2\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search\"}},{\"multi_match\":{\"fields\":[\"_all\"],\"query\":\"\",\"use_dis_max\":false,\"operator\":\"and\",\"fuzziness\":1,\"max_expansions\":3,\"analyzer\":\"searchkick_search2\"}}]}},\"size\":100000,\"from\":0,\"fields\":[]}]]]; nested: QueryParsingException[[businesses_test] [match] analyzer [searchkick_search] not found]; }]","status":400} (Tire::Search::SearchRequestFailed)
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/tire-0.6.2/lib/tire/search.rb:145:in `perform'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/tire-contrib-0.1.3/lib/tire/rails/logger/instrumentation.rb:14:in `block in perform_with_instrumentation'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/notifications.rb:159:in `instrument'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/tire-contrib-0.1.3/lib/tire/rails/logger/instrumentation.rb:13:in `perform_with_instrumentation'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/tire-0.6.2/lib/tire/search.rb:43:in `json'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/searchkick-0.5.0/lib/searchkick/search.rb:351:in `search'
/Users/backend2_tlp/repositories/viasam/app/controllers/providers_controller.rb:74:in `set_locations'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/abstract_controller/base.rb:189:in `process_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_controller/metal/rendering.rb:10:in `process_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:473:in `_run__4334027495525200954__process_action__callbacks'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/abstract_controller/callbacks.rb:17:in `process_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_controller/metal/rescue.rb:29:in `process_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/notifications.rb:159:in `instrument'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.2/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/abstract_controller/base.rb:136:in `process'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/abstract_controller/rendering.rb:44:in `process'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_controller/metal.rb:195:in `dispatch'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_controller/metal.rb:231:in `block in action'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:80:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:48:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/journey/router.rb:71:in `block in call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/journey/router.rb:59:in `each'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/journey/router.rb:59:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:680:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/omniauth-1.2.1/lib/omniauth/strategy.rb:186:in `call!'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/omniauth-1.2.1/lib/omniauth/strategy.rb:164:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/omniauth-1.2.1/lib/omniauth/builder.rb:59:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/route_downcaser-0.2.1/lib/route_downcaser/downcase_route_middleware.rb:21:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/flash.rb:241:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/cookies.rb:486:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.2/lib/active_record/query_cache.rb:36:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:373:in `_run__77402820920205634__call__callbacks'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/cucumber-rails-1.4.0/lib/cucumber/rails/action_controller.rb:10:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/rack/logger.rb:38:in `call_app'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in `block in call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in `block in tagged'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:25:in `tagged'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in `tagged'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.2/lib/action_dispatch/middleware/static.rb:64:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/engine.rb:511:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/application.rb:97:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.1.0/lib/capybara/server.rb:19:in `call'
/Users/backend2_tlp/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
/Users/backend2_tlp/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/Users/backend2_tlp/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/Users/backend2_tlp/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
@javascript
Scenario: follow link in welcome email while logged out
When I create a new account
And I am logged out
And I follow the link in the provider welcome email
Then I should be asked to login
And I should be on the lugares de trabajo page
When /^I create a new account$/ do
subcategory = Subcategory.first.name
fill_in('provider[url]', with: @provider.url)
fill_in('provider[email]', with: "test@example.com")
fill_in('provider[first_name]', with: @provider.first_name)
fill_in('provider[last_name]', with: @provider.last_name)
select(subcategory, from: 'provider[subcategory_id]')
select(@provider.title, from: 'provider[title]')
fill_in('provider[password]', with: "password")
fill_in('provider[password_confirmation]', with: "password")
click_on("submit")
end
And /^I am logged out$/ do
page.driver.remove_cookie("_viasam_session")
end
And /^I follow the link in the provider welcome email$/ do
email = ActionMailer::Base.deliveries.last.body
reset_link = email.match(/(\/proveedores.*?trabajo)/).captures.first.to_s.strip
visit(reset_link)
end
Then /^I should be asked to login$/ do
current_path_is("/proveedor/ingresa")
end
And /^I should be on the lugares de trabajo page$/ do
fill_in("provider_email", with: "test@example.com")
fill_in("provider_password", with: "password")
click_on("provider_login_button")
current_path_is(set_locations_provider_es_path(@provider))
end
def set_locations
@provider_locations = @provider.locations
@businesses = Business.search(params[:query], page: params[:page])
end
class Business < ActiveRecord::Base
searchkick autocomplete: ['commercial_name']
searchkick settings: {number_of_shards: 1}
validates_presence_of :commercial_name
has_many :locations, :dependent => :destroy
accepts_nested_attributes_for :locations,
reject_if: lambda { |a| a[:street_address].blank? },
:allow_destroy => true
end
最佳答案
我几天前就知道了。我需要更改 Controller Action 。
def set_locations
@provider_locations = @provider.locations
if params[:query].present?
@businesses = Business.search(params[:query], page: params[:page])
else
@businesses = []
end
end
关于ruby-on-rails - ElasticSearch和 cucumber ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22693712/
虽然我经常来这里寻求解决方案,但这是我的第一篇文章! 问题: 尝试运行“railsgeneratecucumber:install”时我收到错误:找不到生成器 cucumber :安装 注意:在 Wi
希望我可以清楚地解释我的问题,以使其他人可以理解,在这里,假设我有以下两种假设情况: Scenario: Filter sweets by king size and nut content Give
关闭。这个问题是opinion-based 。目前不接受答案。 想要改进这个问题吗?更新问题,以便 editing this post 可以用事实和引文来回答它。 . 已关闭 7 年前。 Improv
我在下面的 cucumber 项目中设置了 cucumber 选项: 我通过 mvn 命令行使用 -Dcucumber.options 运行测试来覆盖我的项目的选项: mvn -f "pom.xml"
我试图运行一个简单的Feature文件,但是却遇到了Exception这样的异常: 线程“主” cucumber.runtime.CucumberException中的异常:解析功能文件时出错。 这是
我只是在学习 Cucumber 并注意到如果两个完全独立的特征有两个步骤不小心措辞相同,Cucumber 只为它们建议一个步骤定义。这是否意味着步骤定义是全局的并且它们是要共享的? 例子 假设一个业务
我正在尝试配置 FactoryGirl 以使用我的 Cucumber 测试。 我在 env.rb 中添加了以下几行 require 'factory_girl' Dir.glob(File.join(
有没有办法为 Cucumber 中的某个功能定义所有场景的清理步骤?我知道Background用于定义其后的每个场景的设置步骤,但是有没有办法定义在每个场景结束时发生的类似事情? 最佳答案 您可以在
Cucumber-jvm javadocs指出胶水元素的目的是指定stepdefinitions和hook的位置。但是,这似乎对我不起作用。可以说我在目录a中有我的功能,在步骤b中有我的步骤定义。然后
我必须测试一个消息路由应用程序,其功能大致如下:- 消息发送到应用程序- 应用程序检查消息- 根据消息内容,消息被转发到某处 绝大多数测试用例几乎相同;生成特定类型的消息,将其加载到系统中,等待几秒钟
在进行 BDD 时,Cucumber 似乎是指定行为的默认工具,但是 Cucumber 网站和文章看起来有点过时,而且不太活跃。 有哪些替代方案? 最佳答案 一个非常好的库,具有 Eclipse 的高
我有一个Cucumber表中,其中一个字段是一个日期,我想用今天的日期填充该日期。有没有一种方法可以做到这一点,而不必将今天的日期硬编码到表中? 基本上我想在表中输入Time.now.strftime
我有一个步骤定义,我希望其中有一个可选参数。我相信两次调用此步骤的示例比其他任何内容都更好地解释了我所追求的内容。 I check the favorite color count I check t
我在不同环境中执行 cucumber-jvm 场景时遇到问题。包含在场景特征文件中的数据属于一个环境。为了在不同的环境中执行场景,我需要根据要执行的环境更新特征文件中的数据。 例如,在以下场景中,我将
我有一个 cucumber 项目,我想获得项目中的所有标签,以便能够选择它们作为参数。 我找到了这个 question cucumber 可以选择获取标签,但我发现它不再起作用,然后我发现了另一个 q
@@file_name Feature: Addition 为了避免愚蠢的错误 作为一个数学白痴 我想被告知两个数字的总和 场景:两个数字相加 Given I have entered @number
Java v8.x - spring v5.x cucumber v4.2.0 我试过 temyers/cucumber-jvm-parallel-plugin 并且工作正常,但是当我进入他们的 gi
目前,尝试通过命令行窗口运行测试时,以下命令可以工作,但是自从从 info.cakes 更新到 io.cucumber 后,它似乎不再工作了? mvn test -Dcucumber.options=
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题吗? 更新问题,以便 editing this post 提供事实和引用来回答它. 关闭 4 年前。 Improve
如何使用 java 从我的功能中定义“我想要”步骤? 我的 cucumber 项目设置如下: 登录功能 Feature: User Login I want to test on "www.g
我是一名优秀的程序员,十分优秀!