8

How can I check automatically what is seen and what not? Or at least, how can I organize some partly automatic tests?

IDE: Eclipse (could use also IntelliJ Idea if necessary)

Testing tool: Junit (again, could use something else if advised, but better if it is free)

Application OS: Android

Developer's OS: Linux (could change for MAC or Windows(reluctantly))

Language: Java

All the work goes in the external device. No emulator.

The application is a user wrapper for the firmware TV player, called as external activity. So, 70% of the code is for GUI. (The other 30% speak to servers and provides info to the GUI)

Before I programmed the testing function myself, not using any tools. Now I have a tool at hand. But I can't imagine how could I test the UI, with the tool or without it. (Strictly said, with the Internet connections I have problems too, but I'll leave them probably for the other question.) The answer needn't be too platform-dependent, the principles and ideas will help, too.

Of course, it is good to check, is some element in another and checked or not. Some regression checks would be nice for that. But I should also be sure that the element mentioned is not cut by some other elements and winks as I ordered by animation.

The advices here: https://softwareengineering.stackexchange.com/questions/63245/is-there-a-tool-to-test-java-ui won't help - there are only tools, not principles, and none of the tools could help in my situation.

Gangnus
  • 2,817

4 Answers4

5

Most often the best advice for automatic GUI testing is to develop your application in a Model-View-Presenter style and write your tests against the Presenter. The topic is discussed here:

http://danbunea.blogspot.com/2005/11/model-view-presenter-is-testing_27.html

(there are further links at the end of that article).

Of course, that might not help you to "check automatically what is seen and what not", but it may help you to test the most of the UI logic.

Doc Brown
  • 218,378
1

There are testing frameworks that allow you to interact with the screen directly; at my job we use IBM Rational Functional Tester, which allows us to click buttons and so on as well as the usual programmatic testing. Obviously, that's not free, but looking it up on wikipedia provides this list of alternatives. Since you're looking at Java, there's CubicTest, which is an Eclipse plugin; alternatives include Maveryx and Abbot.

0

I use testcomplete. Its a most comprehensive tool I've used to automate GUI testing. http://smartbear.com/products/qa-tools/automated-testing/ check them out I am really positive that this will be a good fit for you and it does support Java

-2

I've been using https://marketplace.atlassian.com/plugins/com.thed.zephyr.je/cloud/overview for a while. It has plugins like ZAPI that help automate testing.