Ask Experts Questions for FREE Help !
Ask
    toobsco42's Avatar
    toobsco42 Posts: 2, Reputation: 1
    New Member
     
    #1

    Dec 4, 2010, 07:53 PM
    How to do unit testing and functional testing on an Android app?
    I have created an app that sends intents among multiple activities. After doing some research I have found that the ActivityUnitTestCase class is designed for unit testing while the ActivityInstrumentationTestCase2 is designed for functional testing. I understand the use of methods such as setUp(), tearDown(), and testPreConditions(). However I am having a little difficulty in trying to figure out what user-defined-tests to create in the previously mentioned classes. I know that there are a few methods that cannot be called in certain classes.

    To be more specific, if I am in activity A and I click a button then it calls startActivityForResult() which starts activity B. I then send an intent back to activity A which is handled in the onActivityResult() method. How can I test that the actual result in onActivityResult() is equal to the expected result?

    I have been looking extensively for any kind of examples that would help clear up this confusion. If anyone could provide any assistance I would greatly appreciate it.

Check out some similar questions!

Why are the KEYPAD button lights flashing and dishwasher unit is not functional? [ 0 Answers ]

Kenmore Elite®/MD Tall Tub Built-in Dishwasher – White Model 76962 Problem Statement: KEYPAD button lights flashing and dishwasher unit is not functional. Symptoms observed: The lights that continuously flash are: SMART WASH NORMAL WASH CANCEL DRAIN

Alcohol testing EtG testing [ 4 Answers ]

I had a etg/alcohol test 10 days ago and had wine the evening prior? I have not heard back from the lab. Has anyone failed or passed with having alcohol in their system? Thank you. Really stressed and very stupid!!

Ua testing [ 2 Answers ]

If it's a holiday weekend and I have to take a ua on Tuesday will it be a EtG test


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.