Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting unit tests automatically after saving a file

With Ruby on Rails, I could use autotest, to run all my tests automatically each time, when I saved a file of my code. Additionally, the framework started only the tests that were affected by the change and it notified me of the test results. Is there anything similar for my java development when using Eclipse?

I don't want something that generates tests for me, it just should start the right tests at the right time automatically.

like image 369
grackkle Avatar asked Jun 13 '11 11:06

grackkle


People also ask

How do I make unit tests automatically?

To generate unit tests, your types must be public. Open your solution in Visual Studio and then open the class file that has methods you want to test. Right-click on a method and choose Run IntelliTest to generate unit tests for the code in your method. IntelliTest runs your code many times with different inputs.

How do I run JUnit tests automatically?

Running Single Test Class. To run JUnit 5 tests from Java code, we'll set up an instance of LauncherDiscoveryRequest. It uses a builder class where we must set package selectors and testing class name filters, to get all test classes that we want to run.

Should unit test read from file?

Strictly speaking, unit tests should not use the file system because it is slow. However, readability is more important. XML in a file is easier to read, and can be loaded in an XML friendly editor.

How do you invoke a unit test?

To run your unit tests after each local build, open the settings icon in the Test Explorer toolbar and select Run Tests After Build.


1 Answers

Possibly Infinitest could interest you.

like image 181
Omnaest Avatar answered Sep 22 '22 18:09

Omnaest