Page MenuHomePhabricator

WBQC test improvements
Closed, ResolvedPublic

Description

  • Use NewItem and NewStatement instead of JsonFileEntityLookup (see also InMemoryEntityLookup)
  • Format according to Arrange-Act-Assert
  • Add helper methods to create constraint parameters once we no longer support the concise template format (instead of copy+pasting the snak construction + serialization everywhere)

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseQualityConstraints : masterUse InMemoryEntityLookup instead of JsonFileEntityLookup
mediawiki/extensions/WikibaseQualityConstraints : masterDon’t use NewStatement to build standalone snaks
mediawiki/extensions/WikibaseQualityConstraints : masterExpand ReferenceContextTest::testGetSnakGroup
mediawiki/extensions/WikibaseQualityConstraints : masterRemove not needed …->withSomeGuid() calls from tests
mediawiki/extensions/WikibaseQualityConstraints : masterRewrite ValueCountChecker tests
mediawiki/extensions/WikibaseQualityConstraints : masterRename @dataProvider methods to provide…()
mediawiki/extensions/WikibaseQualityConstraints : masterDon’t use JsonFileEntityLookup in QualifiersCheckerTest
mediawiki/extensions/WikibaseQualityConstraints : masterDon’t use JsonFileEntityLookup in RangeCheckerTest
mediawiki/extensions/WikibaseQualityConstraints : masterRemove SnakSerializer use from OneOfCheckerTest
mediawiki/extensions/WikibaseQualityConstraints : masterUse NewItem+NewStatement in DiffWithinRangeCheckerTest
mediawiki/extensions/WikibaseQualityConstraints : masterUse NewStatement in tests
mediawiki/extensions/WikibaseQualityConstraints : masterStart using NewItem in tests

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 19 2017, 9:27 AM

Change 359911 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Start using NewItem in tests

https://gerrit.wikimedia.org/r/359911

Change 359911 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Start using NewItem in tests

https://gerrit.wikimedia.org/r/359911

Change 362395 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add {class,relation}Parameter to ConstraintParameters

https://gerrit.wikimedia.org/r/362395

Change 362984 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Use NewStatement in tests

https://gerrit.wikimedia.org/r/362984

Change 362984 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Use NewStatement in tests

https://gerrit.wikimedia.org/r/362984

thiemowmde triaged this task as Low priority.Jul 4 2017, 8:42 AM
thiemowmde moved this task from incoming to in progress on the Wikidata board.
thiemowmde added a subscriber: Jonas.

Change 365060 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Use NewItem NewStatement in DiffWithinRangeCheckerTest

https://gerrit.wikimedia.org/r/365060

Change 365060 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Use NewItem NewStatement in DiffWithinRangeCheckerTest

https://gerrit.wikimedia.org/r/365060

Change 374841 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove SnakSerializer use from OneOfCheckerTest

https://gerrit.wikimedia.org/r/374841

Change 374841 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove SnakSerializer use from OneOfCheckerTest

https://gerrit.wikimedia.org/r/374841

Change 392040 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t use JsonFileEntityLookup in RangeCheckerTest

https://gerrit.wikimedia.org/r/392040

Change 392040 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t use JsonFileEntityLookup in RangeCheckerTest

https://gerrit.wikimedia.org/r/392040

Change 393055 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t use JsonFileEntityLookup in QualifiersCheckerTest

https://gerrit.wikimedia.org/r/393055

Change 393055 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t use JsonFileEntityLookup in QualifiersCheckerTest

https://gerrit.wikimedia.org/r/393055

Change 404715 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Use InMemoryEntityLookup instead of JsonFileEntityLookup

https://gerrit.wikimedia.org/r/404715

Change 405032 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Rewrite ValueCountChecker tests

https://gerrit.wikimedia.org/r/405032

Change 405724 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Rename @dataProvider methods to provide…()

https://gerrit.wikimedia.org/r/405724

Change 405874 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove not needed …->withSomeGuid() calls from tests

https://gerrit.wikimedia.org/r/405874

Change 405724 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Rename @dataProvider methods to provide…()

https://gerrit.wikimedia.org/r/405724

Change 405032 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Rewrite ValueCountChecker tests

https://gerrit.wikimedia.org/r/405032

Change 405874 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove not needed …->withSomeGuid() calls from tests

https://gerrit.wikimedia.org/r/405874

Change 405893 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Expand ReferenceContextTest::testGetSnakGroup

https://gerrit.wikimedia.org/r/405893

Change 405897 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t use NewStatement to build standalone snaks

https://gerrit.wikimedia.org/r/405897

Change 405893 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Expand ReferenceContextTest::testGetSnakGroup

https://gerrit.wikimedia.org/r/405893

Change 405897 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t use NewStatement to build standalone snaks

https://gerrit.wikimedia.org/r/405897

Change 404715 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Use InMemoryEntityLookup instead of JsonFileEntityLookup

https://gerrit.wikimedia.org/r/404715

Anything left to do here or can this be closed?

We still have some uses of JsonEntityLookup in the tests, so that part of the original task description is still open. Apart from that, I’ve kinda been using this task as a catch-all for various stuff I did in the tests… not sure if that makes sense.

@Lucas_Werkmeister_WMDE It might be nice to wrap this task up and close it filing a new with the remaining JsonEntityLookup and tagging with Wikidata-Campsite ready to be picked up in future iterations.

Addshore moved this task from Backlog to Watching on the wikidata-tech-focus board.
Lucas_Werkmeister_WMDE closed this task as Resolved.Sep 18 2018, 12:34 PM