1
0
Fork 0
firefox/devtools/docs/contributor/tests
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00
..
debugging-intermittents.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
js-object-tests.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
mochitest-chrome.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
mochitest-devtools.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
node-tests.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
perfherder-compare-link.png Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
perfherder-compare.png Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
perfherder-create-gecko-profile.png Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
perfherder-damp.png Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
perfherder-filter-subtests.png Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
perfherder-subtests.png Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
performance-tests-damp.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
performance-tests-overview.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
README.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
regression-graph.png Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
regression-popup.png Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
writing-perf-tests-example.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
writing-perf-tests-tips.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
writing-perf-tests.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
writing-tests.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
xpcshell.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00

Automated tests

When 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.

Ask yourself:

  • Are there enough tests for my patch?
  • Are they the right types of tests?

We use three suites of tests:

  • xpcshell: Unit-test style of tests. No browser window, only a JavaScript shell. Mostly testing APIs directly.
  • Chrome mochitests: Unit-test style of tests, but with a browser window. Mostly testing APIs that interact with the DOM.
  • DevTools mochitests: Integration style of tests. Fires up a whole browser window with every test and you can test clicking on buttons, etc.

To run all DevTools tests, regardless of suite type:

./mach test devtools/*

Have a look at the child pages for more specific commands for running only a single suite or single test in a suite.