Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:translators:testing [2017/06/02 19:16]
zuphilip [Automated Testing] Fix website for translator testing
dev:translators:testing [2017/11/12 19:53] (current)
Line 1: Line 1:
 +<​html><​p id="​zotero-5-update-warning"​ style="​color:​ red; font-weight:​ bold">​We’re
 +in the process of updating the documentation for
 +<a href="​https://​www.zotero.org/​blog/​zotero-5-0">​Zotero 5.0</​a>​. Some documentation
 +may be outdated in the meantime. Thanks for your understanding.</​p></​html>​
 +
 +
 ====== Translator Testing ====== ====== Translator Testing ======
 In order to provide consistent and reliable operation on a variety of pages and inputs, it is possible to define tests for import, web, and search translators. These tests are defined as a JSON blocks within the translator text, including the input URL or text, and the expected result from running the translator on that input. A translator that provides good test coverage of its functionality can then be more easily maintained-- in the case of input translators,​ development can proceed with reduced risk of causing regressions,​ and in the case of web translators,​ target site changes that lead to partial or complete translator breakage can be detected and documented without relying on user reports. In order to provide consistent and reliable operation on a variety of pages and inputs, it is possible to define tests for import, web, and search translators. These tests are defined as a JSON blocks within the translator text, including the input URL or text, and the expected result from running the translator on that input. A translator that provides good test coverage of its functionality can then be more easily maintained-- in the case of input translators,​ development can proceed with reduced risk of causing regressions,​ and in the case of web translators,​ target site changes that lead to partial or complete translator breakage can be detected and documented without relying on user reports.
Line 41: Line 47:
 ===== Automated Testing ===== ===== Automated Testing =====
 The translator tests are run daily at 9 pm EST by the Zotero project to detect new failures and incompatibilities. Test results are available at https://​zotero-translator-tests.s3.amazonaws.com/​index.html The translator tests are run daily at 9 pm EST by the Zotero project to detect new failures and incompatibilities. Test results are available at https://​zotero-translator-tests.s3.amazonaws.com/​index.html
 +
 +====== Further Reading ======
 +
 +More detailed instructions are available at [[https://​www.mediawiki.org/​wiki/​Citoid/​Creating_Zotero_translators#​For_translation-server_side_development |MediaWiki]]. See [[https://​www.mediawiki.org/​wiki/​Citoid/​Creating_Zotero_translators#​Write_test_cases|Write testCases (with translation-server)]] or [[https://​www.mediawiki.org/​wiki/​Citoid/​Creating_Zotero_translators#​Generate_test_cases|Generate testCases (with Scaffold)]].
dev/translators/testing.txt · Last modified: 2017/11/12 19:53 (external edit)