Closed
Description
#199 でテストをランダム化したらコケるテストを見つけた
手元ではseedを指定すると確実にコケるので、以前は順序依存によりテストが通っていたものと考えられる。
ScrivitoのObjが見つからないというメッセージなのでWorkspaceに存在しないのが原因?🤔
#160 でScrivitoのObjをモック化するので、その対応でテストが通るようになるかもしれない。
$ git rev-parse HEAD
7f337c3426cdafd388ce308d3fc09c77ee95dc3c
$ bundle exec rspec spec/ --seed 49001
Randomized with seed 49001
....F...........................................
Failures:
1) Users log in with invalid information
Failure/Error: visit login_path
Scrivito::ResourceNotFound:
Could not find Obj with id 00ea184b4cbff1a1
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/obj_collection.rb:133:in `find_using'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/obj_collection.rb:19:in `find'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/basic_obj.rb:208:in `find'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/cms_env.rb:35:in `find_obj'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/cms_env.rb:23:in `load_object'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/cms_env.rb:13:in `load'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/cms_dispatch_controller.rb:9:in `process'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:in `dispatch'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in `dispatch'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in `serve'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in `block in serve'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `each'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `serve'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/disable_browser_cache_for_ui_middleware.rb:8:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/workspace_selection_middleware.rb:19:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/cache_middleware.rb:9:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/scrivito_sdk-1.11.0/app/cms/scrivito/editing_context_middleware.rb:46:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/etag.rb:25:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/conditional_get.rb:25:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-user_agent-0.5.2/lib/rack/user_agent.rb:16:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
# ./vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in `run_callbacks'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36:in `call_app'
# ./vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:24:in `block in call'
# ./vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69:in `block in tagged'
# ./vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:26:in `tagged'
# ./vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69:in `tagged'
# ./vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:24:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:125:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/secure_headers-5.0.1/lib/secure_headers/middleware.rb:13:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `each'
# ./vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rack-test-0.7.0/lib/rack/mock_session.rb:30:in `request'
# ./vendor/bundle/ruby/2.4.0/gems/rack-test-0.7.0/lib/rack/test.rb:249:in `process_request'
# ./vendor/bundle/ruby/2.4.0/gems/rack-test-0.7.0/lib/rack/test.rb:59:in `get'
# ./vendor/bundle/ruby/2.4.0/gems/capybara-2.15.4/lib/capybara/rack_test/browser.rb:69:in `process'
# ./vendor/bundle/ruby/2.4.0/gems/capybara-2.15.4/lib/capybara/rack_test/browser.rb:41:in `process_and_follow_redirects'
# ./vendor/bundle/ruby/2.4.0/gems/capybara-2.15.4/lib/capybara/rack_test/browser.rb:22:in `visit'
# ./vendor/bundle/ruby/2.4.0/gems/capybara-2.15.4/lib/capybara/rack_test/driver.rb:44:in `visit'
# ./vendor/bundle/ruby/2.4.0/gems/capybara-2.15.4/lib/capybara/session.rb:276:in `visit'
# ./vendor/bundle/ruby/2.4.0/gems/capybara-2.15.4/lib/capybara/dsl.rb:50:in `block (2 levels) in <module:DSL>'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-rails-3.7.1/lib/rspec/rails/example/feature_example_group.rb:29:in `visit'
# ./spec/features/users_spec.rb:14:in `block (3 levels) in <top (required)>'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:350:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:509:in `block in run_owned_hooks_for'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:508:in `each'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:508:in `run_owned_hooks_for'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:595:in `block in run_example_hooks_for'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:594:in `reverse_each'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:594:in `run_example_hooks_for'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:464:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:494:in `run_before_example'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:253:in `block in run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `block in run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:606:in `block in run_around_example_hooks_for'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:342:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-rails-3.7.1/lib/rspec/rails/adapters.rb:127:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:375:in `execute_with'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:608:in `block (2 levels) in run_around_example_hooks_for'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:342:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-retry-0.5.0/lib/rspec/retry.rb:112:in `block in run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-retry-0.5.0/lib/rspec/retry.rb:101:in `loop'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-retry-0.5.0/lib/rspec/retry.rb:101:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-retry-0.5.0/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-retry-0.5.0/lib/rspec/retry.rb:30:in `block (2 levels) in setup'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:375:in `execute_with'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:608:in `block (2 levels) in run_around_example_hooks_for'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:342:in `call'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:609:in `run_around_example_hooks_for'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `with_around_example_hooks'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `with_around_and_singleton_context_hooks'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:251:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:628:in `block in run_examples'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `map'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `run_examples'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:590:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:591:in `block in run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:591:in `map'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:591:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:591:in `block in run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:591:in `map'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:591:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (3 levels) in run_specs'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `map'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (2 levels) in run_specs'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb:1896:in `with_suite_hooks'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:113:in `block in run_specs'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/reporter.rb:79:in `report'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:112:in `run_specs'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:87:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:71:in `run'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:45:in `invoke'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-core-3.7.0/exe/rspec:4:in `<top (required)>'
# ./vendor/bundle/ruby/2.4.0/bin/rspec:23:in `load'
# ./vendor/bundle/ruby/2.4.0/bin/rspec:23:in `<top (required)>'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:74:in `load'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:74:in `kernel_load'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:27:in `run'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:362:in `exec'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:22:in `dispatch'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:13:in `start'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/exe/bundle:30:in `block in <top (required)>'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
# /Users/kimuraaaaa/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/exe/bundle:22:in `<top (required)>'
# ./bin/bundle:3:in `load'
# ./bin/bundle:3:in `<main>'
Top 10 slowest examples (12.18 seconds, 89.6% of total time):
Sotechsha GET /sotechsha/num Quizzes should be permalink
2.75 seconds ./spec/features/sotechsha_spec.rb:7
Sotechshas Quizzes should be permalink Quizzes should be permalink
2.66 seconds ./spec/requests/sotechshas_spec.rb:6
Users log in with invalid information
1.78 seconds ./spec/features/users_spec.rb:24
Users log in with valid information should text "道場情報まとめ"
1.42 seconds ./spec/features/users_spec.rb:33
Users log in with invalid information should text "ログイン"
1.25 seconds ./spec/features/users_spec.rb:23
SessionsController GET #create param unmatch
0.64488 seconds ./spec/controllers/sessions_controller_spec.rb:10
NewsPages GET /news/2016/12/12/new-backend Blog post should be rendered
0.52205 seconds ./spec/requests/news_pages_spec.rb:5
Sotechsha GET /sotechsha SoTechSha link should be rendered
0.42499 seconds ./spec/features/sotechsha_spec.rb:17
Sotechsha GET /sotechsha/1 Datetime should be formatted
0.37394 seconds ./spec/features/sotechsha_spec.rb:26
News GET /news/2016/12/12/new-backend Title should be formatted
0.36099 seconds ./spec/features/news_spec.rb:6
Top 10 slowest example groups:
Sotechshas
1.49 seconds average (2.97 seconds / 2 examples) ./spec/requests/sotechshas_spec.rb:3
Users
1.48 seconds average (4.45 seconds / 3 examples) ./spec/features/users_spec.rb:5
Sotechsha
1.18 seconds average (3.55 seconds / 3 examples) ./spec/features/sotechsha_spec.rb:4
NewsPages
0.52273 seconds average (0.52273 seconds / 1 example) ./spec/requests/news_pages_spec.rb:3
News
0.36153 seconds average (0.36153 seconds / 1 example) ./spec/features/news_spec.rb:4
Statistics::Aggregation
0.21084 seconds average (0.21084 seconds / 1 example) ./spec/lib/statistics/aggregation_spec.rb:4
SessionsController
0.17448 seconds average (0.69791 seconds / 4 examples) ./spec/controllers/sessions_controller_spec.rb:3
BlogPostPageController
0.09279 seconds average (0.18557 seconds / 2 examples) ./spec/controllers/blog_post_page_controller_spec.rb:3
DocsController
0.09059 seconds average (0.27177 seconds / 3 examples) ./spec/controllers/docs_controller_spec.rb:3
Top
0.07547 seconds average (0.07547 seconds / 1 example) ./spec/features/top_spec.rb:3
Finished in 13.59 seconds (files took 9.11 seconds to load)
48 examples, 1 failure
Failed examples:
rspec ./spec/features/users_spec.rb:24 # Users log in with invalid information
Randomized with seed 49001
Metadata
Metadata
Assignees
Labels
No labels