How to generate a report on the test results using robotics?

I use robotium to test my android app. The test was successful, but I want to know that there is a way to view the test results in a separate file.

+5
source share
6 answers

I was lucky that I just ran robotium tests like regular Android JUnit tests, and then used a standard mechanism to return the test results, namely ant task-test-report task. To do this, I used the build.xml file created by the android using the toolkit. For detailed configuration instructions, see the development documentation for other IDEs . Good luck

+2

logcat Log.'severity '(tag, msg) ( "" i-info, d-debug, w-warn, e-error, v-verbose), myView:

String viewName = solo.getString(R.string.myViewName); 
try {
    solo.clickOnView((View) solo.getView(R.id.myView));
    Log.i("Passed", viewName + " works correctly.");
} catch (Exception e) {
    Log.e("Error", viewName + " doesn't work.");
}

.txt. , script, InstrumentationTestRunner .

. : , logcat

+2

XML , Eclipse IDE

,

  • Junit, , eclipse As- > Android Junit Test.

  • , IDE.

  • , Junit eclipse, "", XML.

, , .

enter image description here

+2

, :

1-XML- XML-/ apis

2-logcat , , Eclipse IDE

3-configured report recording on the device under test, for this you need apis to write to the device

These are three of several options available to suit your requirements and IDE.

+1
source

You can use the PolideainstrumentationtestRunner, it allows you to specify exactly where you want to save the test result. (add junitXmlOutput true and junitOutputDirectory yourPath parameter)

http://code.google.com/p/the-missing-android-xml-junit-test-runner/

Hope this helps.

0
source

All Articles