<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear devs,<div class=""><br class=""></div><div class="">Assuming the landing of patches in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1380470" class="">https://bugzilla.mozilla.org/show_bug.cgi?id=1380470</a> sticks, you all can enjoy the following from tomorrow onwards:</div><div class=""><br class=""></div><div class="">Paraphrased from the bug’s description:</div><div class=""><div class="">You can now use `add_task(async function someTest() {}).skip()` and `add_task(async function someTest() {}).only()`, for Mochitest-chrome, Mochitest-browser and XPCShell tests, with the following semantics:</div><div class=""><br class=""></div><div class="">* `.skip()` makes sure that the task in question is not run as part of the suite. This will be made very clear in the log output as well.</div><div class="">* `.only()` makes sure that only the task in question is run, thus all the other tasks in that suite will be skipped. If `.only()` is called multiple times, it will run the last one on the stack, IOW: the last task on which `.only()` was called.</div><div class=""><br class=""></div><div class="">The motivation behind this feature is to promote Test Driven Development (TDD) and intermittent failure research work by allowing more granular control of what test gets run during your debugging process.</div><div class="">In large, growing test suites it's more likely that you'll be wishing to skip a certain test case because it takes a long time or has nothing to do with the failure case or rather to check if it pollutes the behavior of other tests.</div><div class="">In large, growing suites, it's also more likely that you'll be wishing for a convenient way to focus on a single test case, instead of the suite as whole. Example: extended feature development.</div></div><div class=""><br class=""></div><div class="">IMPORTANT: this change effectively deprecated XPCShell’s `add_test.skip(function test() {})`, `add_test.only(function test() {})`, `add_task.skip(async function test() {})` and `add_task.only(async function test() {})` in favor of the API mentioned above. This allowed for a substantially simpler implementation.</div><div class=""><br class=""></div><div class="">Thanks Standard8 (Mark Banner) for the idea and ahal (Andrew Halberstadt) for the reviews!</div><div class=""><br class=""></div><div class="">Enjoy and have fun,</div><div class=""><br class=""></div><div class="">Mike.</div></body></html>