• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..30-Mar-2022-

README.mdH A D30-Mar-20221.2 KiB2415

debugging-intermittents.mdH A D30-Mar-20226.5 KiB8547

mochitest-chrome.mdH A D30-Mar-2022253 159

mochitest-devtools.mdH A D30-Mar-20221.1 KiB3726

node-tests.mdH A D30-Mar-20223.8 KiB8354

performance-tests.mdH A D30-Mar-202210.3 KiB193148

writing-perf-tests-example.mdH A D30-Mar-20222.1 KiB6852

writing-perf-tests-tips.mdH A D30-Mar-20222 KiB4128

writing-perf-tests.mdH A D30-Mar-20228.6 KiB14498

writing-tests.mdH A D30-Mar-202213.5 KiB239149

xpcshell.mdH A D30-Mar-2022234 159

README.md

1# Automated tests
2
3When working on a patch for DevTools, there's almost never a reason not to add a new test. If you are fixing a bug, you probably should write a new test to prevent this bug from occurring again. If you're implementing a new feature, you should write new tests to cover the aspects of this new feature.
4
5Ask yourself:
6* Are there enough tests for my patch?
7* Are they the right types of tests?
8
9We use three suites of tests:
10
11* [`xpcshell`](xpcshell.md): Unit-test style of tests. No browser window, only a JavaScript shell. Mostly testing APIs directly.
12* [Chrome mochitests](mochitest-chrome.md): Unit-test style of tests, but with a browser window. Mostly testing APIs that interact with the DOM.
13* [DevTools mochitests](mochitest-devtools.md): Integration style of tests. Fires up a whole browser window with every test and you can test clicking on buttons, etc.
14
15More information about the different types of tests can be found on the [automated testing page](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Automated_testing) at MDN.
16
17To run all DevTools tests, regardless of suite type:
18
19```bash
20./mach test devtools/*
21```
22
23Have a look at the child pages for more specific commands for running only a single suite or single test in a suite.
24