Confirmed users
905
edits
No edit summary |
|||
| Line 34: | Line 34: | ||
* This is a basic structure of a Robocop test | * This is a basic structure of a Robocop test | ||
* Each test class must have three methods: | * Each test class must have three methods: | ||
** protected void setUp() // Starts Fennec and sets up commonly used member variables. This is usually very similar for every test class | ** protected void setUp() ''// Starts Fennec and sets up commonly used member variables. This is usually very similar for every test class '' | ||
** public void test[YourFeature]() // Your test code goes here. Use the Robocop API to access Fennec elements, click, send keys, and assert conditions | ** public void test[YourFeature]() ''// Your test code goes here. Use the Robocop API to access Fennec elements, click, send keys, and assert conditions'' | ||
** public void tearDown() // Clean up | ** public void tearDown() ''// Clean up'' | ||
* If your tests extends BaseTest then you will not need to add the methods setUp() and tearDown() as they are already defined in BaseTest | * If your tests extends BaseTest then you will not need to add the methods setUp() and tearDown() as they are already defined in BaseTest | ||
* If you need to do extra clean-up, like removing entries you added in a database for e.g., the tearDown() method can be overwrittern but make sure the first line of the method is '''super.tearDown()'''. The same is applicable for setUp(). | * If you need to do extra clean-up, like removing entries you added in a database for e.g., the tearDown() method can be overwrittern but make sure the first line of the method is '''super.tearDown()'''. The same is applicable for setUp(). | ||