On 03/06/14 22:28, Jonas Sicking wrote: > testharness.js still requires lots of boiler plate. Especially when > writing async tests. And especially if you try to follow the rule that > each test within a file should clean up after itself.
At this point testharness.js has taken several steps to allow more minimal tests. For example it has the concept of "single page tests" so that if you want to write one test per page you don't need to use lots of boilerplate; a test looks like <title>Test the load event fires</title> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script>onload=done</script> At this point I think the main high-level semantic difference with mochitest is that mochitest keeps going after asserts fail. > I suspect this > is part of the reason we haven't seen more people use it for normal > regression-test writing. I suspect the stronger reason is that the process for getting testharness.js tests running on Mozilla infrastructure has been unclear. Until that is solved — something which I expect to happen soon — it is unreasonable to expect people to use it. > * The fact that our httpd.js is completely non-standard and unlikely > to ever run in other environments. Moving to node.js or pythons > BaseHTTPServer seems much more likely to get it accepted in other > environments. Node.js seems like the better choice given that all test > writers will need to know JS anyway. Again, this isn't so much a > problem with SimpleTest.js, but rather the environment that we use it > in. At this point, more or less the whole of Mochitest, as used at Mozilla, is completely non-standard and unlikely to get accepted for running in other environments. web-platform-tests has standardised on a Python-based web server designed specifically for writing tests. Care has been taken to ensure that the test environment is portable to a number of different setups e.g. running on a central server, running on an individual's machine, running on automation, etc. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform