Testes automatizados

71 views
Skip to first unread message

Pedro Cortez

unread,
Jan 27, 2014, 11:59:42 AM1/27/14
to androidb...@googlegroups.com
Galera, 
vocês usam testes automatizados nos seus projetos?
Se sim, o que vocês testam? Tudo? Só os metodos com regras de negocio? Testam layout, botões?

att,
Pedro Cortez

Felipe Lima

unread,
Jan 28, 2014, 10:45:43 AM1/28/14
to androidb...@googlegroups.com, pedro.fell...@gmail.com
Olá Pedro,

Utilizo jUnit para testar mais as classes de negócio e domínio, tive mto problema testando Activities então decidi não investir muito tempo nisso.
Além de jUnit, tb uso Robolectric, Mockito, etc.
Para testes funcionais utilizo Calabash.

luciofm

unread,
Jan 28, 2014, 11:15:01 AM1/28/14
to androidb...@googlegroups.com
Eu tenho utilizado o Roboletric para fazer os Unit Tests (ainda em negócio só, mas quero utilizar para Activities e tal tb...), com Mockito, Fest-Android, bla bla bla

Lúcio Maciel
luc...@gmail.com


2014-01-28 Felipe Lima <felip...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Pedro Cortez

unread,
Jan 28, 2014, 11:26:23 AM1/28/14
to androidb...@googlegroups.com
Obrigado galera, 
estava fazendo testes de forma nativa e estava ficando frustrado com a demora. Vou testar esse robolectric =]

att,
Pedro Cortez


2014-01-28 luciofm <luc...@gmail.com>

Pedro Cortez

unread,
Jan 28, 2014, 12:09:34 PM1/28/14
to androidb...@googlegroups.com
Vocês usam esse gradle-android-test-plugin?

att,
Pedro Cortez


2014-01-28 Pedro Cortez <pedro.fell...@gmail.com>

Felipe Lima

unread,
Jan 28, 2014, 12:10:43 PM1/28/14
to androidb...@googlegroups.com, Pedro Cortez
Eu uso, mas me arrependi.
O suporte no Android Studio é mínimo, ou seja, nao tem autocomplete, auto-import, nao da pra rodar os testes pela IDE, etc. É BEM limitado.

— Felipe Lima

From: Pedro Cortez Pedro Cortez
Reply: androidb...@googlegroups.com androidb...@googlegroups.com
Date: January 28, 2014 at 3:09:37 PM
To: androidb...@googlegroups.com androidb...@googlegroups.com
Subject:  Re: [androidbrasil-dev] Re: Testes automatizados
You received this message because you are subscribed to a topic in the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/androidbrasil-dev/fvpWk7FK-n8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to androidbrasil-...@googlegroups.com.

luciofm

unread,
Jan 28, 2014, 12:13:41 PM1/28/14
to androidb...@googlegroups.com
Eu uso ele...

Existem duas versões https://github.com/novoda/gradle-android-test-plugin onde os testes rodam no mesmo projeto, e https://github.com/novoda/gradle-android-test-plugin onde os testes são um projeto a parte...

Felipe, para ter auto complete no Android Studio tem um pequeno truque, definir as dependencias de test tanto como testCompile e instrumentTestCompile

    testCompile 'junit:junit:4.10'
    testCompile 'org.robolectric:robolectric:2.3-SNAPSHOT'
    testCompile 'com.squareup:fest-android:1.0.+'
    testCompile "org.mockito:mockito-all:1.9.5"
    testCompile 'com.squareup.retrofit:retrofit-mock:1.3.0'

    instrumentTestCompile 'junit:junit:4.10'
    instrumentTestCompile 'org.robolectric:robolectric:2.3-SNAPSHOT'
    instrumentTestCompile 'com.squareup:fest-android:1.0.+'
    instrumentTestCompile "org.mockito:mockito-all:1.9.5"
    instrumentTestCompile 'com.squareup.retrofit:retrofit-mock:1.3.0'


Pedro Cortez

unread,
Jan 28, 2014, 12:16:28 PM1/28/14
to androidb...@googlegroups.com
Lucio,
vocÊ mandou os 2 links iguais

luciofm

unread,
Jan 28, 2014, 12:17:24 PM1/28/14
to androidb...@googlegroups.com

Lúcio Maciel
luc...@gmail.com


2014-01-28 Pedro Cortez <pedro.fell...@gmail.com>

Felipe Lima

unread,
Jan 28, 2014, 12:18:10 PM1/28/14
to androidb...@googlegroups.com, luciofm
Eu vinha usando o do Jake Wharton, mas está deprecated já...
Vou dar uma olhada nesse do novoda
Valeu, Lucio

— Felipe Lima

From: luciofm luciofm
Reply: androidb...@googlegroups.com androidb...@googlegroups.com
Date: January 28, 2014 at 3:17:30 PM

Felipe Lima

unread,
Jan 28, 2014, 12:23:52 PM1/28/14
to androidb...@googlegroups.com, luciofm

— Felipe Lima

From: luciofm luciofm
Reply: androidb...@googlegroups.com androidb...@googlegroups.com
Date: January 28, 2014 at 3:17:30 PM

Cleber - Android Developer

unread,
Jan 29, 2014, 6:04:33 AM1/29/14
to androidb...@googlegroups.com
Um amigo me passou um link me dizendo que o TestComplete agora tem suporte para Android. Segue o link http://www2.smartbear.com/tc-trial-email-mobile.html
Pelo menos para desktop o TestComplete é uma das melhores ferramentas do mercado para teste automatizados.

Pedro Cortez

unread,
Jul 15, 2014, 1:41:51 PM7/15/14
to androidb...@googlegroups.com
Galera, 
desculpa reviver a thread, mas tentei usar o roboletric  e não consegui de forma alguma.
Alguem tem alguma dica? ou link que ajude?

abraços

att,
Pedro Cortez

Jhonatas Martins dos Santos

unread,
Jul 16, 2014, 7:51:17 AM7/16/14
to androidb...@googlegroups.com, pedro.fell...@gmail.com
Dá algum erro Pedro ou algo do tipo ?

quando eu configurei eu usei esse plugin https://github.com/JakeWharton/gradle-android-test-plugin

mas já está depreciado.

Abs

Pedro Cortez

unread,
Jul 16, 2014, 2:04:29 PM7/16/14
to androidb...@googlegroups.com
Sim,
ele diz que os testes nao existem. Eu utilizei a versão mais atual do roboletric, ele manda usar esse link

Fiz o q ele manda e nao consegui. =/

att,
Pedro Cortez


For more options, visit https://groups.google.com/d/optout.

Jhonatas Martins dos Santos

unread,
Jul 17, 2014, 7:50:33 AM7/17/14
to androidb...@googlegroups.com, pedro.fell...@gmail.com

Pedro Cortez

unread,
Jul 17, 2014, 12:38:48 PM7/17/14
to androidb...@googlegroups.com
Quando eu chegar em casa vou tentar e mando o feedback aqui.

abraços

att,
Pedro Cortez
Reply all
Reply to author
Forward
0 new messages