summaryrefslogtreecommitdiffstats
path: root/devtools/docs/contributor/tests/mochitest-devtools.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /devtools/docs/contributor/tests/mochitest-devtools.md
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/docs/contributor/tests/mochitest-devtools.md')
-rw-r--r--devtools/docs/contributor/tests/mochitest-devtools.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/devtools/docs/contributor/tests/mochitest-devtools.md b/devtools/docs/contributor/tests/mochitest-devtools.md
new file mode 100644
index 0000000000..e5f44ba1d6
--- /dev/null
+++ b/devtools/docs/contributor/tests/mochitest-devtools.md
@@ -0,0 +1,36 @@
+# Automated tests: DevTools mochitests
+
+To run the whole suite of browser mochitests for DevTools (sit back and relax):
+
+```bash
+./mach mochitest --subsuite devtools --tag devtools
+```
+To run a specific tool's suite of browser mochitests:
+
+```bash
+./mach mochitest devtools/client/<tool>
+```
+
+For example, run all of the debugger browser mochitests:
+
+```bash
+./mach mochitest devtools/client/debugger
+```
+To run a specific DevTools mochitest:
+
+```bash
+./mach mochitest devtools/client/path/to/the/test_you_want_to_run.js
+```
+Note that the mochitests *must* have focus while running. The tests run in the browser which looks like someone is magically testing your code by hand. If the browser loses focus, the tests will stop and fail after some time. (Again, sit back and relax)
+
+In case you'd like to run the mochitests without having to care about focus and be able to touch your computer while running:
+
+```bash
+./mach mochitest --headless devtools/client/<tool>
+```
+
+You can also run just a single test:
+
+```bash
+./mach mochitest --headless devtools/client/path/to/the/test_you_want_to_run.js
+```