Confirmed users
905
edits
No edit summary |
|||
| Line 7: | Line 7: | ||
* The test file name should be test[Feature_to_be_tested].java.in | * The test file name should be test[Feature_to_be_tested].java.in | ||
* The test must be included in the same package as all other Robocop tests | * The test must be included in the same package as all other Robocop tests | ||
= How to start when writing a new test = | |||
* Setup the enviroment. Follow the instructions [https://wiki.mozilla.org/QA_SoftVision_Team/Mobile/Robocop_automation_setup here]. | |||
* Download sources. More info can be found [https://wiki.mozilla.org/QA_SoftVision_Team/Mobile/Robocop_automation_setup#Download_sources_using_Mercurial here] about how to do it. | |||
* If you already have the sources downloaded update to the lates version by running the command in the sources directory: | |||
hg pull -u | |||
* Make the build by running in '''superuser''': | |||
make -f client.mk | |||
* Create a new file named "test" followed by the test name and with the extention "java.in" : for e.g. ''testBookmarks.java.in'' | |||
* Copy the basic structure of the test presented in the next section to the test making sure to match the test name and the class and constructure names. | |||
* Create a new mercurial queue patch on the repository by running in the source folder the command: | |||
hg qnew <patch_name> | |||
* Add the new test file to the queue by running the command: | |||
hg add mobile/android/base/tests/<test_file_complete_name> | |||
* Open robocop.ini from mobile/android/base/tests and add after the last Robocop test a new line with the test name between sqare brackets ( "[" and "]") | |||
* Write the test, compile robocop (here is how) and run the test in order to test that it works | |||
* After the test works follow the instruction to create a patch so the test can be uploaded to a bug and integrated in mozilla. | |||
= Basic structure of the test = | = Basic structure of the test = | ||