0

I want to start writing automated application tests for my android app and Im following this tutorial

http://developer.android.com/tools/testing/testing_ui.html

right down the middle it says "add a new java project, then go to build path and add JUnit 3 library"

So I did, and here is what happens:

enter image description here

Kaloyan Roussev
  • 14,515
  • 21
  • 98
  • 180
  • The current version of [junit](http://junit.org/) is 4.12, is that included? Eclipse is usually bundled with the latest version. If not, you can normally pull popular libraries like this from the standard addon locations (`Help` -> `Install new software...`) – blgt Feb 13 '15 at 09:46
  • I CAN select JUnit4, but the tutorial clearly states that I need 3. Also, when I try to select JUnit4, it says it needs a Java5 project. Also I dont know how to use the "Install new software" facility to install JUnit 3 - I tried it but couldnt do anything. I googled about it but found nothing – Kaloyan Roussev Feb 13 '15 at 09:54
  • 1
    Java 5 and JUnit 3 are, at this point, ancient. Tutorials like that are rarely, if ever, updated. You should be fine just using the new versions of both -- they're (mostly) backwards-compatible – blgt Feb 13 '15 at 09:55
  • Thank you! I chose JUnit 4 and was able to continue – Kaloyan Roussev Feb 13 '15 at 10:13

1 Answers1

1

As mentioned in the comments --

Tutorials like this one, once written, are rarely if ever updated.

Java 5 (2008) and jUnit 3 (2007) are both ancient; you should be fine just using the new versions of both -- they're (mostly) backwards-compatible.

A side note: Eclipse doesn't care about the versions of the plugins its running: it comes bundled with the latest ones at the time of build, but you can install older or newer ones if you have to. Android, on the other hand, has been known to complain about some dependencies (see IntelliJ IDEA with Junit 4.7 "!!! JUnit version 3.8 or later expected:"), but these cases are few and far between, and well-documented to boot

Community
  • 1
  • 1
blgt
  • 8,135
  • 1
  • 25
  • 28