User talk:Ahunt/TestsOverviewWIP
From MozillaWiki
We have a lot of types of tests - hopefully we can create a more succinct overview to help new and existing contributors more easily determine what kind of test they really want to write, and how to write it!
Warning: This page is a work in progress, and thefore INCOMPLETE. Feel free to ask on IRC if you are unsure about what kind of test to write.
TODO: you can also run |mach test ....| TODO: mxr search for directory
Java tests
Since most of our frontend code is Java, we also have a lot of Java tests:
Test Type | How to run | Is executed in/on | Comments | Runs in automation |
---|---|---|---|---|
#Robocop Tests | mach robocop | On a device/emulator, with a server on your development machine | Allows testing of the running app. | Yes |
#JUnit3 | tbc: in your IDE | On a device/emulator | Allows testing of non-UI Android dependent code | ??? |
Roboelectric / junit4 | tbc: in your IDE | In your IDE / on your machine (purely local) | Allows testing of purely Java code that doesn't rely on Android frameworks. | ??? |
Robocop tests
Test location:
mobile/android/tests/browser/robocop
Resources: ...the various test pages...
JUnit3
TODO: More detailed how to run (i.e. run individual tests), where the tests are located, what resources they can access, how to add a test.
Javascript tests
Mochitests...
TODO: continue this