Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sbt/Activator not running all tests in Play2 java project

SBT/Activator are not running all of the tests in my project. Is there something I'm missing?

Eg this is a test:

public class ApplicationTest {

    @Test
    public void simpleCheck() {
        int a = 1 + 1;
        assertThat(a).isEqualTo(2);
    }

    @Test
    public void renderTemplate() {
        assert(1==1);
    }


}

It's in the test folder, has all attributes junit expects, yet does not run when I execute 'sbt test' or 'activator test'. It only seems to run the files that end with IntegrationTest... Is there something I need to do differently? Can't find any solution here.

like image 763
JasonG Avatar asked Dec 14 '22 20:12

JasonG


1 Answers

'activator clean test' fixed this for me. Unsure why - I've worked with sbt for a long time with scala and have never seen this.

like image 119
JasonG Avatar answered Jan 05 '23 17:01

JasonG