Are you using ServiceTestCase? If one is testing a Service, by far the
best way to do it is to use ServiceTestCase as the test case class.
Use InstrumentationTestRunner as the test runner. Android testing
using instrumentation is documented in SDK 2.2. See *Framework Topics*
and *Developing*. There's also a tutorial in the *Reference* tab.

ServiceTestCase has a startService(Intent) method.

On Aug 5, 2:40 am, nikhilesh singh tak <[email protected]>
wrote:
> yes like that only... but i want to start the service from my test 
> application.
>
>
>
>
>
> On Thu, Aug 5, 2010 at 2:44 PM, Jeroen Kransen <[email protected]> wrote:
> > Something like this from an Activity:
>
> > startService(new Intent(this, RemoteSynchronizer.class));
>
> > Jeroen
>
> > On 5 aug, 11:08, nikki <[email protected]> wrote:
> >> hi Elk
>
> >> thanks for the reply.
>
> >> I am able to start the service when i specify an implicit intent to
> >> start the service but i am not getting any clue on how to start the
> >> service with the explicit intent i.e. actually specifying the service
> >> class.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Nikhilesh Singh Tak
>
> +91-9630934374
> +91-9929098279

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to