Confirmed users
1,759
edits
(→Setup) |
(→Setup) |
||
Line 7: | Line 7: | ||
Copying a test from the examples is the best way to start. | Copying a test from the examples is the best way to start. | ||
Your test should be in the file test[ | Your test should be in the file test[Feature].java.in -- see mobile/android/base/tests. | ||
The flow of the test will go from starting the application to killing it. | The flow of the test will go from starting the application to killing it. | ||
Line 17: | Line 17: | ||
</pre> | </pre> | ||
Each test | Then define a test class extending the Robotium ActivityInstrumentationTestCase2: | ||
<pre> | |||
public class testMyFeature extends ActivityInstrumentationTestCase2 | |||
</pre> | |||
Each test class must have three methods: | |||
setUp() - Starts Fennec and sets up commonly used member variables. This is usually very similar for every test class. | |||
test[Feature]() - Your test code goes here. | |||
tearDown() - Clean up. This is usually very similar for every test class. | |||
= APIs = | = APIs = |