Tecnologia do Blogger.
RSS

[androidbrasil-dev] [OFF-TOPIC]: Framework para automatização de testes no Android

Pessoal, boa noite.

            Estou desenvolvendo um framework baseado no Robotium utilizando o UIAutomator.  A idéia do uso será a mesma que o Robotium traz, ou seja, a facilidade de uso para escrever um teste unitário. Uma das coisas que me fez criar este framework foi devido ao Robotium infelizmente ter a restrição de estar atrelado a apenas um processo, ou seja, uma app. Já o UIAutomator não tem este tipo de problema. 
           Segue os prós e contras de utilizar as ferramentas , segundo um bom debate que teve no stackOverflow:

Robotium

pros:

  • support hybrid applications with webViews.
  • you can bound your test to unique IDs of tested application whenever with UIatomator to write complicated test cases will need great amount of work from you
  • in UIatomator is used UiAutomatorTestCase Instrumentation which doesn't give you possibilities to call current activity and check that loaded appropriate one, you can't call connectivity- or audio- managers for wi-fi or sound tests. In Robotium you can easily call such gems and that is greatly improve efficiency of your tests
  • Open source project, so you can modify tool to your needs

cons:

  • No possibility to tests multi-process application where android:process tag used for different activities.

UIAutomator:

pros:

  • Test case is independent from the process at which tested application works. So it can be used in places where are used additional libraries or activity is run in other process also useful if for test needed switching between several applications.

cons:

  • Works only on Android version 4.1 or more!

  • You can't use source IDs when you get ui-object instances. That mean if an application structure changed on one layout you need to refactor your test (this problem can be solved by using tags for each ui-element)

  • You can't get current activity or Instrumentation. That mean you are limited in development of your tests and not used many of android's api methods for your tests.

  • Hard to debug, you need to have script for buiding and starting your test fast and see output


        O framework que estou desenvolvendo entraria no ponto de facilitar a vida no momento dos testes. Quem tiver interesse em ajudar na API , será muito bem vindo. Com o tempo irei colocando mais features , seguindo como referência a API do Robotium.

        Por fim o link do código que eu coloquei no githubt é este aqui.

Abçs.

 

--
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-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário