Commit Graph

30 Commits

Author SHA1 Message Date
Fabien Meghazi dde0c9324b [IMP] Convered qunit test suite to template
bzr revid: fme@openerp.com-20140428182451-u4mgen9669gnldva
2014-04-28 20:24:51 +02:00
Xavier Morel bb7eb52699 [REM] RPC from js/qunit tests
They're a pain in the ass, they never worked right and they're basically
useless. Screw it.

bzr revid: xmo@openerp.com-20140221143518-hv3rjkw2b00ughvh
2014-02-21 15:35:18 +01:00
Christophe Simonis b79f35471e [FIX] testing: rpc tests works directly on the source database instead of copying it
bzr revid: chs@openerp.com-20140221095500-5cer5exzdei76y1d
2014-02-21 10:55:00 +01:00
Xavier Morel ae3223907b [FIX] modules initialization when testing
broken "adaptation" to single-instance openerp would only initialize the first
set of dependencies, any further module would see its test runs without itself
or its dependencies being guaranteed to be initialized/installed into the
current openerp instance.

bzr revid: xmo@openerp.com-20140131152640-coxqulkdb0xupbvq
2014-01-31 16:26:40 +01:00
Christophe Simonis b61997e716 [FIX] web: correct url matching in tests
bzr revid: chs@openerp.com-20131114094624-588lvc9vunwa99d8
2013-11-14 10:46:24 +01:00
niv-openerp c63a86c593 [IMP] Merged corelib.js and coresetup.js into core.js
bzr revid: nicolas.vanhoren@openerp.com-20130806122623-pq6bpkjk65jx0fnp
2013-08-06 14:26:23 +02:00
niv-openerp f6318cc753 Yiiiiha! This day was shitty but that damn tests finally work.
bzr revid: nicolas.vanhoren@openerp.com-20130801160847-tcx6va9x1kp0q7eo
2013-08-01 18:08:47 +02:00
niv-openerp 9ce24aea39 Merge trunk
bzr revid: nicolas.vanhoren@openerp.com-20130801125845-2aoeb7l6bicdmk59
2013-08-01 14:58:45 +02:00
Xavier Morel cdee92f984 [IMP] update QUnit to 1.12.0 (doesn't fix issue, adds features)
bzr revid: xmo@openerp.com-20130801091239-6lz0ya595i226l85
2013-08-01 11:12:39 +02:00
niv-openerp dae87b4535 Try to reimplement jsonrpc with niv's methods, still a lot of tests fail
bzr revid: nicolas.vanhoren@openerp.com-20130731163415-v6ec0nqsr0qj91a6
2013-07-31 18:34:15 +02:00
niv-openerp 0c79e1b079 Fixed multiple side effects related to the session
bzr revid: nicolas.vanhoren@openerp.com-20130726142707-eyfq5hmubm38slk1
2013-07-26 16:27:07 +02:00
niv-openerp 5c7b6cffde Fixed some problems about testing framework
bzr revid: nicolas.vanhoren@openerp.com-20130726131805-wstt1de2qqq7w7hx
2013-07-26 15:18:05 +02:00
niv-openerp c767a0d34c Added semicolons
bzr revid: nicolas.vanhoren@openerp.com-20130725103301-65nld10p1if7k0zt
2013-07-25 12:33:01 +02:00
Fabien Meghazi bf6bdf017b [IMP] Changed tests according to new client side fields view get
bzr revid: fme@openerp.com-20121205160656-0mg1hnv35vk27adh
2012-12-05 17:06:56 +01:00
Olivier Dony 706a58bfec [IMP] instance.init: less offensive constant
bzr revid: odo@openerp.com-20121130175249-yrbcdsn2z1io79dz
2012-11-30 18:52:49 +01:00
Xavier Morel 5a9f78302f [MERGE] from trunk
when creating the instance, set instance.session.uid to 42 so the evaluator has something to chew on when it tries to create the evaluation context

bzr revid: xmo@openerp.com-20121120101733-b0ire11bbuywfi8u
2012-11-20 11:17:33 +01:00
Xavier Morel e1e4c48c18 [REM] test runner feature which probably caused more trouble than it caught
avoid catching exception in executed callback, it just hinders debugging by generated completely bonkers traces

bzr revid: xmo@openerp.com-20121116105554-hu45anetrj1a8tl6
2012-11-16 11:55:54 +01:00
Xavier Morel 796e80ec2d [FIX] deferred.pipe -> deferred.then
bzr revid: xmo@openerp.com-20121116101417-mkcjrdtocl6w7408
2012-11-16 11:14:17 +01:00
Xavier Morel 09037e8a42 [REM] failing test code
committed by mistake

bzr revid: xmo@openerp.com-20121116073738-9f43bm0q6eojns3v
2012-11-16 08:37:38 +01:00
Xavier Morel d632471f64 [IMP] web test runner: pass execute's arguments to the function to avoid duplication
bzr revid: xmo@openerp.com-20121116072906-0di2j83p602a2l9i
2012-11-16 08:29:06 +01:00
Xavier Morel a9645151b6 [IMP] setup & teardown of test runner
simplify code and make setup & teardown processes more reliable

add testing.Stack tools which stacks promise-returning functions
around the actual promise-returning function to execute (the test case
itself).

testing.Stack returns an object with 3 methods, ``push([setup][,
teardown])``, ``unshift([setup][, teardown])`` and ``execute(fn,
*args)``. ``push`` and ``unshift`` create a new stack with the
provided setup and teardown added respectively at the top and bottom
of the stack.

``execute`` will walk the stack from bottom to top executing ``setup``
handlers (and waiting on their result), if all setup handlers execute
without failure the ``fn`` callback gets executed (and waited on) then
*all* ``teardown`` handlers are executed from top to bottom:

 |  setup
 |    setup
 |      setup
 |        setup
 |          fn
 |        teardown
 |      teardown
 |    teardown
 V  teardown

If a ``setup`` handler fails (the promise is rejected), teardowns will
start executing *from the previous level* (so the ``teardown``
matching the failed ``setup`` will *not* be run), but all
``teardowns`` below that will be run regardless, even if one fails the
next one will still be executed.

The stack will either ultimately return a promise rejection using the
*first* rejection it got (a rejection may be cascading, so the
rejection of a setup may also lead to or be linked to a teardown being
rejected later), or will return the resolution from ``fn``.

If ``execute`` is passed further arguments, those arguments will in
turn be forwarded to ``fn`` as well as all ``setup`` and ``teardown``
handlers.

bzr revid: xmo@openerp.com-20121116071712-zuld957icellezum
2012-11-16 08:17:12 +01:00
Xavier Morel 8e85f4e0bd [IMP] timeout discipline
* Global timeout significantly increased to correctly handle e.g. db creation and teardown
* Per-test timeout brought back down to 2s

bzr revid: xmo@openerp.com-20121115091501-ys8opo0ccr3dq29h
2012-11-15 10:15:01 +01:00
Xavier Morel f24cbe0795 [FIX] don't apply teardown when setup fails
bzr revid: xmo@openerp.com-20121030082217-yjbh7j4apszsyg8l
2012-10-30 09:22:17 +01:00
Xavier Morel 5b1990bd18 [IMP] make failure of rpc cleanup fail the owning test
bzr revid: xmo@openerp.com-20121030081525-i611as22kjlhcex5
2012-10-30 09:15:25 +01:00
Xavier Morel d2cf844e7b [IMP] allow providing db-cloning info directly in URL for test runner
bzr revid: xmo@openerp.com-20121030074615-lt517w5t9fd9ppvh
2012-10-30 08:46:15 +01:00
Xavier Morel 523f4a6e03 [FIX] db name being used to drop databases after rpc tests
xmo@openerp.com-20121029110154-5927gaix8k0ijl0c introduced a
regression which wasn't caught by deferred piping (?) and caused
databases to not be dropped after rpc tests

bzr revid: xmo@openerp.com-20121030074325-wh39s75vj2zob9e0
2012-10-30 08:43:25 +01:00
Xavier Morel bf4a26d3e8 [ADD] actual-RPC tests, with UI. Bump QUnit timeout to 10s so RPC can run at all
bzr revid: xmo@openerp.com-20121029110154-5927gaix8k0ijl0c
2012-10-29 12:01:54 +01:00
Xavier Morel a130035409 [IMP] port basic/existing tests to new framework, apart from editor stuff
bzr revid: xmo@openerp.com-20121026092144-0arxx2v9oi28e3d6
2012-10-26 11:21:44 +02:00
Xavier Morel 04282ff00e [IMP] port search test to new framework, add handling of web.{submodule} dependencies
bzr revid: xmo@openerp.com-20121026084543-fobkc3ta5q2jc3q6
2012-10-26 10:45:43 +02:00
Xavier Morel 99a2dd3938 [ADD] first 90% of non-sucky testing API, last 90% left
also all existing tests shoud now be completely broken and need to be fixed

bzr revid: xmo@openerp.com-20121025154745-rw2gktfd6tp68k2m
2012-10-25 17:47:45 +02:00