Page MenuHomePhabricator

Review test coverage for add link feature
Closed, ResolvedPublic

Description

We've been avoiding writing a lot of tests but as development stabilizes, it would be useful to add in some tests to protect against regression tests.

We can use this task to make a more specific list of areas we'd like coverage for – end-to-end testing on the frontend, integration tests, unit tests, etc.

QUnit

PHPUnit

unit tests

integration tests

  • TBD

e2e

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

One thing I'd like to cover especially well is refreshLinkRecommendations.php. It's very hard to test manually, it has lots of code paths, and it will be hard to diagnose what's going on if it breaks. (Related: T276795: Monitoring for GrowthExperiments link recommendation task pool)

kostajh raised the priority of this task from Low to Medium.May 12 2021, 12:14 PM
kostajh updated the task description. (Show Details)
MMiller_WMF raised the priority of this task from Medium to High.Jun 7 2021, 5:11 PM

One thing I'd like to cover especially well is refreshLinkRecommendations.php. It's very hard to test manually, it has lots of code paths, and it will be hard to diagnose what's going on if it breaks. (Related: T276795: Monitoring for GrowthExperiments link recommendation task pool)

I think we could cover that in part by the proposed refactoring in T284551: Maintenance script for updating recommendations to newer dataset, and adding unit tests for the shared class.

kostajh lowered the priority of this task from High to Medium.Jun 28 2021, 10:34 AM
kostajh updated the task description. (Show Details)
kostajh updated the task description. (Show Details)

Moving to "Code review" mainly to get consensus / input from other engineers if there's anything else want to spend time writing tests for. If so, please update the task description.

@mewoph @Tgr -- please check this out and add comments if you wish!

@mewoph @Tgr -- please check this out and add comments if you wish!

I'm marking this as resolved – @Tgr @mewoph if you want to file more tasks for test coverage, please do :)