QA SoftVision Team/Mobile/Writing tests: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 274: Line 274:
  mAsserter.ok(list != null, "checking that all pages list exists", list.toString()); // tests if  
  mAsserter.ok(list != null, "checking that all pages list exists", list.toString()); // tests if  
  the list is null and if it isn't it prints the list after printing the message of what the test does
  the list is null and if it isn't it prints the list after printing the message of what the test does
 
= Debugging tests =
== See the screenshot from the fail in the try run ==
* Open the link to the tryrun and view the full logs of the failed run
* Go the the position the fail you are interested in has happened
* Search for "base64" and copy the hole line from the log
* Remove the "SCREENSHOT" from the beginning of the string and paste it in the URL bar of the browser
* You can see the screenshot of the output the moment the test failed
== Debugging using logs ==
* You can use mAsserter.dump(Sting) or mAsserter.ok(true, Sting, String) to print any string or value of any variable
* Note that you will need to cast the variable to String in order to print it: String.valueOf(Variable)
= Updating your test directory =
= Updating your test directory =
It is not always necessary to rebuild Fennec to use new tests. If you are updating the build with your own test, ensure that your test has been added to the manifest in /PATH/TO/FENNEC/SOURCE/mobile/android/base/tests/robocop.ini .
It is not always necessary to rebuild Fennec to use new tests. If you are updating the build with your own test, ensure that your test has been added to the manifest in /PATH/TO/FENNEC/SOURCE/mobile/android/base/tests/robocop.ini .
Confirmed users
905

edits

Navigation menu