[IMP] web: HOOT - documentation
This commit is contained in:
parent
eed7e42a14
commit
7dc3584094
@ -21,3 +21,4 @@ Web framework
|
||||
frontend/mobile
|
||||
frontend/qweb
|
||||
frontend/odoo_editor
|
||||
frontend/unit_testing
|
||||
|
31
content/developer/reference/frontend/unit_testing.rst
Normal file
31
content/developer/reference/frontend/unit_testing.rst
Normal file
@ -0,0 +1,31 @@
|
||||
=======================
|
||||
JavaScript Unit Testing
|
||||
=======================
|
||||
|
||||
Writing unit tests is as important as writing the code itself: it helps to
|
||||
ensure that the code is written according to a given specification and that it
|
||||
remains correct as it evolves.
|
||||
|
||||
Testing Framework
|
||||
=================
|
||||
|
||||
Testing the code starts with a testing framework. The framework provides a level of abstraction
|
||||
that allows to write tests in an easy and efficient way. It also provides a set of tools to run the
|
||||
tests, make assertions and report the results.
|
||||
|
||||
Odoo developers use a home-grown testing framework called :abbr:`HOOT (Hierarchically Organized
|
||||
Odoo Tests)`. The main reason for using a custom framework is that it allows us to extend it based
|
||||
on our needs (tags system, mocking of global objects, etc.).
|
||||
|
||||
On top of that framework we have built a set of tools to help us write tests for the web client
|
||||
(`web_test_helpers`), and a mock server to simulate the server side (`mock_server`).
|
||||
|
||||
You can find links to the reference of each of these parts below, as well as a section filled with
|
||||
examples and best practices for writing tests.
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
|
||||
unit_testing/hoot
|
||||
unit_testing/web_helpers
|
||||
unit_testing/mock_server
|
1678
content/developer/reference/frontend/unit_testing/hoot.rst
Normal file
1678
content/developer/reference/frontend/unit_testing/hoot.rst
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
||||
===========
|
||||
Mock server
|
||||
===========
|
||||
|
||||
TODO: write documentation
|
||||
|
||||
.. _mock-server/mock-server:
|
||||
|
||||
.. js:class:: MockServer()
|
@ -0,0 +1,9 @@
|
||||
================
|
||||
Web test helpers
|
||||
================
|
||||
|
||||
TODO: write documentation
|
||||
|
||||
.. _web-test-helpers/mount-with-cleanup:
|
||||
|
||||
.. js:function:: mountWithCleanup()
|
Loading…
Reference in New Issue
Block a user