carlos palma
carlos palma

Reputation: 782

Dagger and Intellij Functional Testing configuration to allow debugging

I have an API written in Dagger with maven and it already has some Functional tests. When I run

mvn clean verify

The tests work correctly. However when I try to run them from the IDE, or debug them, the Dagger auto generated code inside the generated-tests-sources folder complains about a class that cannot be found.

Basically there's a Dagger config class like this:

public interface TestConfigComponent {
    ...
    void inject(BaseFT basefT);
}

And in BaseFT we have something like this:

  @Before
  public void beforeTest() throws Exception {
 
    DaggerTestConfigComponent.create().inject(this);

  }

Now to be honest I truly don't understand the difference between executing the tests via mvn verify and doing it by pushing the "play" button on intellij, but it's clear that something's missing in my intellij configuration to be able to debug these tests, what do I have to do to accomplish this goal?

And the FT all inherit from the BaseFT class:

public class MyBeautifulFT extends BaseFT{

}

And the error message is the following:

java: cannot find symbol
  symbol:   class BaseFT
  location: package com.package.name

Upvotes: -1

Views: 74

Answers (0)

Related Questions