If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Reduce the time it takes to run our test suite



Code Quality
3 years ago
3 years ago


(Reporter: rrosario, Unassigned)



Firefox Tracking Flags

(Not tracked)




3 years ago
I've noticed the tests have slowed down and it takes a while for them to get going initially, even if you are only running one test.

I think we should spend some time trying to make our tests faster. We can use this bug to track our progress.

willkg reported:

The kitsune tests take me a long time to run so I decided to poke around and see what I could see.

I installed nose-timer (https://github.com/mahmoudimus/nose-timer) and ran "--with-timer --timer-top-n=20" and got this:

kitsune.dashboards.tests.test_cron.L10nMetricsTests.test_update_l10n_coverage_metrics: 2.8904s
kitsune.messages.tests.test_templates.SendMessageTestCase.test_send_message_ratelimited: 1.9932s
kitsune.kpi.tests.test_api.KpiApiTests.test_active_contributors: 1.7940s
kitsune.search.tests.test_es.ElasticSearchUnifiedViewTests.test_advanced_search_sortby_documents_helpful: 1.7473s
kitsune.questions.tests.test_badges.TestQuestionsBadges.test_answer_badge: 1.3963s
kitsune.questions.tests.test_views.TestRateLimiting.test_answer_vote_logged_in: 1.1733s
kitsune.kbforums.tests.test_templates.ThreadsTemplateTests.test_locale_discussions_ignores_sticky: 1.1716s
kitsune.questions.tests.test_views.AAQTests.test_ratelimit: 1.1303s
kitsune.offline.tests.test_views.OfflineViewTests.test_get_bundle_meta: 1.0775s
kitsune.search.tests.test_cmds.ESCommandTests.test_reindex: 1.0742s
kitsune.kbforums.tests.test_feeds.FeedSortingTestCase.test_threads_sort: 1.0629s
kitsune.community.tests.test_templates.LandingTests.test_top_contributors: 1.0507s
kitsune.search.tests.test_synonyms.SearchViewWithSynonyms.test_synonyms_work_in_search_view: 1.0500s
kitsune.community.tests.test__utils.TopContributorTests.test_top_contributors_questions: 1.0484s
kitsune.kbforums.tests.test_feeds.FeedSortingTestCase.test_posts_sort: 1.0345s
kitsune.questions.tests.test_views.TestRateLimiting.test_answer_vote_limit: 0.9403s
kitsune.wiki.tests.test_facets.TestFacetHelpersES.test_documents_for: 0.9126s
kitsune.search.tests.test_es.ElasticSearchUnifiedViewTests.test_created: 0.9013s
kitsune.wiki.tests.test_facets.TestFacetHelpersES.test_documents_for_fallback: 0.8650s
kitsune.questions.tests.test_views.TestRateLimiting.test_question_vote_logged_in: 0.8496s

OK!  1609 tests, 0 failures, 0 errors, 5 skips in 278.3s

Comment 1

3 years ago
Q4 2014 is over.
Target Milestone: 2014Q4 → 2015Q1
Bug #1074850 covers upgrading Selenium. I'm working on that now. That reduces the test times on my machine because currently Selenium tests start Firefox browser, but then time out after 30s trying to talk to it. We have a handful of Selenium tests, so that adds up. Yuck.

Pull #2432 also reworks the qunit test making it a lot faster. That's not in the list above, but it sucks up a lot of time.
Depends on: 1147861
PR #2432 landed in master.
You need to log in before you can comment on or make changes to this bug.