Android Test - Call Method


I would like to know if in the android Unit test would have the possibility to call isolated methods of the code, or if just calling activitys, buttons ... I researched in several places and I did not find anything talking about

asked by anonymous 11.07.2014 / 13:37

1 answer


You have full access to all activity methods either implicitly or explicitly.


public void testNomeAplicacao() {
      TextView nomeAplicacao = (TextView) demo.findViewById(;
      assertEquals(nomeAplicacao.getText().toString(), "Helo World, EuAndroid");


More information here

11.07.2014 / 16:43