NetBeans 10 JUnit Jar not found

I'm running netbeans 10 as well, in xubuntu if that helps. I have no idea what is going on, so I had to revert to junit4. EDIT: To be perfectly clear, ant needs junit.jar which is nowhere to be found in the default netbeans 10 installation. Until someone brings a better solution, revert to junit4:

1) in your test libraries, right click and import the junit 4.1.2 ones.

2) remove the junit 5.3 ones.

3) scrap all the imports in your test file and use the junit4 ones. ie your imports will look like:

import static junit.framework.Assert.assertEquals;
import org.junit.Test;
import org.junit.*;
/*import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;*/

4) scrap the beforeAll and other test tags. Only leave the @Test one.

5) save all, close and re-open the project. It will complain that the hamcrest libraries for junit4 are not imported. Allow netbeans to fix it for you.

With that done, I was able to test successful and failing tests. I guess when you generate the junit tests with the template generator, it will generate the junit5 ones, so, a bit annoying. But you'll have tests!