Re: [android-developers] positron 1.0 (an acceptance testing tool) and android-ant

3 views
Skip to first unread message

freepine

unread,
Nov 19, 2008, 2:25:17 AM11/19/08
to autoa...@googlegroups.com
Hi Smith,

I tried positron 1.0 with your example, and found that it was really amazing:)
Is there an easy way to write similar test cases for native SDK APIs (e.g, write test cases for android.media.MediaPlayer)? Because I am very interested in porting android SDK to other hardware profilers.

Thank you.

-freepine

On Tue, Nov 18, 2008 at 10:16 AM, philhsmith <phil.h...@gmail.com> wrote:

Hello all!

It's been a long while, but a new version of positron is out!
Positron is a story runner / acceptance testing tool for android in
the spirit of selenium or watir.  With it, you can
 * Manipulate your application by pressing keys, touching the screen
or trackball, using the menus, etc
 * Inspect application state simply and (thread) safely
 * Run arbitrary sql to set up database fixtures

If you remember the earlier versions of positron, there are some key
differences 1.0 brings to the table:
 * It works with the current release of Android
 * Tests can be launched in eclipse and use the eclipse junit UI
(happy green bar!)
 * Applications are automatically reinstalled before each run
 * You can svn co http://autoandroid.googlecode.com/svn/trunk/samples/notepad
and see a fully-functional sample right now. (You may need to set the
ANDROID_HOME environment variable.)

That last one involves a sub-project named android-ant, which is a
small antlib to
 * call the bundled sdk tools in a platform-independent way
 * easily start and stop an emulator for running tests

The projects have moved to a new site since there's more than one
now.  Please check out http://code.google.com/p/autoandroid/ for
more.  The wiki will hopefully be enough to get you started, but be
sure to download the javadocs jar and see PositronAPI for the complete
list of available call.

Lastly, please (pretty please!) send me bugs at
http://code.google.com/p/autoandroid/issues/list or say hello at
http://groups.google.com/group/autoandroid

Happy Testing!


philhsmith

unread,
Nov 19, 2008, 10:21:51 AM11/19/08
to Auto-android
As I understand it, an instrumentation (the thing positron uses to
control the UI) can only really affect the package it is bundled with.
If you look in the sample application's AndroidManifest.xml, there's a
few lines that declare the instrumentation and a handful of
permissions it needs. I imagine you will need to install a custom
copy of the MediaPlayer app, whose manifest also includes lines.
After that it might Just Work, or it might not. If you give it a
crack, definitely let me know so I can try to reproduce and include it
as an example.

Thanks for taking taking interest!

On Nov 19, 1:25 am, freepine <freep...@gmail.com> wrote:
> Hi Smith,
> I tried positron 1.0 with your example, and found that it was really
> amazing:)
> Is there an easy way to write similar test cases for native SDK APIs (e.g,
> write test cases for android.media.MediaPlayer)? Because I am very
> interested in porting android SDK to other hardware profilers.
>
> Thank you.
>
> -freepine
>
> >http://code.google.com/p/autoandroid/issues/listor say hello at
> >http://groups.google.com/group/autoandroid
>
> > Happy Testing!
Reply all
Reply to author
Forward
0 new messages