spotlight icon indicating copy to clipboard operation
spotlight copied to clipboard

Address various test suite performance/consistency issues

Open jkeck opened this issue 7 years ago • 3 comments

Potential areas of improvement identified:

  • [x] Convert some feature tests to unit tests
    • [x] Some feature specs could probably be view specs, etc.
    • [ ] ZPR link!!
  • [ ] Analyze slowest tests, classify types of tests for refactoring
  • [x] Explore options for mocking responses from our infrastructure (webmock)
  • [ ] Cut out some Sir Trevor testing if it doesn’t directly pertain to our code?
  • [x] Swarm the top 2 or 3 sir-trevor-related tests that cause the most trouble
  • [x] Cut down on instances of FactoryBot.create (#1978)
  • [x] ~Remove “sleep”s from tests (async) (#1975)~
  • [x] see options for killing animations in embed (#1976)
  • [x] sudo false travis thing

jkeck avatar Apr 03 '18 22:04 jkeck

Slowest tests on travis:

Top 10 slowest example groups:
  About page
    16.2 seconds average (32.4 seconds / 2 examples) ./spec/features/about_page_spec.rb:1
  Slideshow
    12.96 seconds average (12.96 seconds / 1 example) ./spec/features/slideshow_spec.rb:1
  Featured Pages Blocks
    12.74 seconds average (25.49 seconds / 2 examples) ./spec/features/javascript/blocks/featured_pages_block_spec.rb:2
  Link to Search Block
    11.76 seconds average (23.52 seconds / 2 examples) ./spec/features/javascript/blocks/link_to_search_block_spec.rb:1
  Featured Browse Category Block
    11.65 seconds average (23.3 seconds / 2 examples) ./spec/features/javascript/blocks/featured_browse_categories_block_spec.rb:2
  Search Result Block
    11.42 seconds average (11.42 seconds / 1 example) ./spec/features/javascript/blocks/search_result_block_spec.rb:2
  Multi image selector
    6.58 seconds average (6.58 seconds / 1 example) ./spec/features/javascript/multi_image_select_spec.rb:1
  Horizontal rule block
    4.78 seconds average (4.78 seconds / 1 example) ./spec/features/javascript/blocks/rule_block_spec.rb:1
  Uploaded Items Block
    4.65 seconds average (9.29 seconds / 2 examples) ./spec/features/javascript/blocks/uploaded_items_block_spec.rb:1
  Reindex Monitor
    4.54 seconds average (4.54 seconds / 1 example) ./spec/features/javascript/reindex_monitor_spec.rb:1

https://travis-ci.org/projectblacklight/spotlight/builds/361895492

mejackreed avatar Apr 03 '18 23:04 mejackreed

Instead of pending, should we skip tests we know aren't actively going to change?

mejackreed avatar Apr 04 '18 00:04 mejackreed

There are also some parallelization approaches outlined here: https://docs.travis-ci.com/user/speeding-up-the-build/

mejackreed avatar Apr 04 '18 13:04 mejackreed