Unit testing

Put your problem here if it does not fit any of the other categories.

Unit testing

Postby willievu » Thu Dec 20, 2007 3:14 am

There is a package android.test. Does anyone know how to make use of it to write unit tests for Activity, ContentProvider, etc?
willievu
Freshman
Freshman
 
Posts: 6
Joined: Tue Dec 04, 2007 9:16 am

Top

Postby plusminus » Thu Dec 20, 2007 5:33 pm

Hello willievu,

haven't tested the android.test yet, as projects haven't been complex enough yet ^^
Found two-testing-packages for Android:

http://code.google.com/p/android-positron/
Android instrumentations are powerful tools for automating android applications and make a nice fit for automated acceptance testing.

Positron provides an instrumentation and some support classes to help writing acceptance tests. It is provided as a jar that gets bundled with your application.

Right now acceptance tests are written in junit. Support for running scripts from resources is planned...


http://p-unit.sourceforge.net/
An open source framework for unit test and performance benchmark, which was initiated by Andrew Zhang, under Apache License v2.0. p-unit supports to run the same tests with single thread or multi-threads, tracks memory and time consumption, and generates the result in the form of plain text, image or pdf file.


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Problems with Positron

Postby Exsch » Tue Jul 29, 2008 10:00 am

Hello,

I have some problems with the android-positron testing. I used http://code.google.com/p/android-positron/ to set the tesenvironment up. I'm developing under: android-sdk_m5-rc15_windows

By starting a testCase from eclipse I get the folloing warning on the LogCat:

Unable to find instumentation info for: ComponentInfo{packageName/packageName.Positron}

By starting a testCase from console I get the same warning on the LogCat and following on cosole:

INSTRUMENTATION_FAILED: package/package.Positron

Can anyody help me with this problem?
Exsch
Freshman
Freshman
 
Posts: 2
Joined: Mon Jul 28, 2008 7:19 pm

Postby Exsch » Wed Aug 13, 2008 8:53 am

Ok, we found the mistake,

you have to install the positron like the description, and run it from the Emulator under:

DEV TOOLS INSTRUMENTATION PositronTest
Exsch
Freshman
Freshman
 
Posts: 2
Joined: Mon Jul 28, 2008 7:19 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 11 guests