5

I've tried to get the Infinitest Plugin for Eclipse to automatically run my tests. According to the documentation, it hooks into all @Test annotated tests and runs the test class, as soon as the system under test class is changed.

The plugin was installed via the eclipse update site provided at the github page. I do have the status bar as expected, but it simply stays yellow saying "No related tests found for last change".

So far I've tried several project types down to a simple java project - I can manually run all tests via Run As -> JUnit Test and JUnit works as expected. Infinitest is enabled in the preferences. Several tutorials, the (extremely short) documentation and pages have not helped. I don't have a filter file present.

I am running Eclipse Mars (4.5.1) on Ubuntu 15.10 with Infinitest 5.1.115 and JUnit 4.12.0.

Lars
  • 5,757
  • 4
  • 25
  • 55
  • @specializt I did not know that, thank you. I've un- and reinstalled Infinitest via the Marketplace - still the "no related tests found for last change", no matter if I change the system-under-test or the tests. – Lars Feb 02 '16 at 11:13
  • @specializt this is news to me too, what is the source of this information? – Jonah Graham Feb 02 '16 at 12:38
  • I think infinitest analyzes which files you have changed and only runs tests if they import the changed class or something like that. – the8472 Feb 02 '16 at 18:03
  • 3
    Please disregard the above "never install anything manually via update sites", that is very much a recommended way to install plug-ins. – Jonah Graham Feb 03 '16 at 09:07
  • may I know what java version are you using? – Scitech Feb 08 '16 at 16:46

4 Answers4

0

I installed Infinitest Plugin on Eclipse Luna 4.4.2 (my current IDE) and I followed the instruction from there. I made a class with a method and I annotated with @Test (JUnit4 Library), then I made a text file named infinitest.filters that contain ".*"(regular expression). It is important that this text file to be on src folder (path: SomeProjectName/src).

Smita Ahinave
  • 1,901
  • 7
  • 23
  • 42
alexandrum
  • 429
  • 9
  • 17
  • Thanks for your answer. Even after adding the infinitest.filters as described, I have to change in behavior. No matter if I change the test-class or the tested class, Infinitest just shows "No related tests found for last change". I also use annotated test cases. – Lars Feb 02 '16 at 11:14
  • That's strange. I put the project [link](https://www.dropbox.com/s/txd07n8djqjo9f0/Foo.zip?dl=0) on my dropbox if you want to check. Be sure that even if the project is on build automatically, clean it from Project->Clean... (In Eclipse IDE) – alexandrum Feb 02 '16 at 11:41
  • I'm using Windows 7. – alexandrum Feb 02 '16 at 13:19
0

I have Java EE Eclipse Mars 4.5.2 with Infintest. Only when I put infinitest.filters file in the project folder my arquillian integration tests are skipped.

Folder project structure:

  • src/
    • /main
    • /test
  • pom.xml
  • infintest.filters

infinitest.filters example ( skipping all tests from package ):

  • com\.company\.app\.integrationtest\..*
0

Infinitest doesn't work if the file path to the *.class and/or *.java file contains space character(s) - perhaps that's the problem.

Steve
  • 31
  • 4
0

I've just ran into the same problem, and resolved it by activating:

Project -> Build Automatically.

pringi
  • 3,987
  • 5
  • 35
  • 45