Issue
I have developed some app when I was a beginner, I was doing manual testing. Should I go for unit testing or instrumentation testing?
Solution
Yes you should do it. There is no excuse to let it slide since Android is providing a nice UI Test Framework Espresso
With simple code like this e.g.
onView(withId(R.id.my_view)) // withId(R.id.my_view) is a ViewMatcher
.perform(click()) // click() is a ViewAction
.check(matches(isDisplayed())); // matches(isDisplayed()) is a ViewAssertion
and with the new Espresso Test Recorder you can even record your test cases. It's still in beta, but it creates a handy code snippet which you can base your tests on.
Answered By - Murat Karagöz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.