Hi Adam,

Sorry for only coming back to you just now on this matter.

It’s challenging to figure out the issues remotely, but I can share some ideas 
and maybe one of them was in fact the problem:

1. Integration tests are requires you to run the backend with “test” profile.
- Some integration tests are relying on APIs that are only supported for 
internal usage / test purposes.

I believe in your case this might be the underlying issue:
-  some of the tests are completed and green, some of the tests are red and you 
see HTTP 404 errors.

Would you mind retrying with the below, additional environment variable? 
SPRING_PROFILES_ACTIVE=test

In case i didnt guess the issue right, here are other possible solutions in my 
new guide: 
https://fineract-academy.com/how-to-fix-common-issues-of-integration-tests.html

I hope it helps!

Regards,
Adam

> On 2025. Jan 23., at 4:39, Adam Monsen <amon...@mifos.org> wrote:
> 
> Thanks Ádám! I did see the IntelliJ instructions at 
> https://fineract-academy.com <https://fineract-academy.com/> and those mostly 
> work for me for building code and starting a Fineract server, but I've never 
> been able to get all the tests to pass. Just now I tried running all 
> integration tests in IntelliJ as you describe against the tip of develop and 
> it took 40min: Failed: 917, passed: 431, ignored: 23. 1,373 tests total. It's 
> hard to say if I'm doing something wrong and if so, what. I think I'll just 
> start over, following your instructions even more carefully.
> 
> I also tried running integration tests locally in a Bash shell. I tried the 
> gradlew commands you provided as well as several others from 
> .github/workflows/* , and many combinations of env vars. It seemed like my 
> env vars weren't working as intended? I was getting 404s instead of 200s even 
> though I could use the API without issues, hit the actuator, see the swagger 
> page, etc. Maybe something is hard-coded, and works differently in IntelliJ 
> than from a command line?
> 
> re: smoke -- Even if they all passed I'd imagine it would still take a while 
> to run... seems a bit heavyweight for a pre-release smoke test.
> 
> Here are the env vars I'm using (I just source this before I try gradlew 
> commands):
> 
> export FINERACT_DEFAULT_TENANTDB_PORT=5432
> export POSTGRES_DB=postgres
> export POSTGRES_USER=root
> export POSTGRES_PASSWORD=postgres
> export FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
> export 
> FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://localhost:$FINERACT_DEFAULT_TENANTDB_PORT/fineract_tenants
> export FINERACT_HIKARI_USERNAME=$POSTGRES_USER
> export FINERACT_HIKARI_PASSWORD=$POSTGRES_PASSWORD
> export FINERACT_SERVER_SSL_ENABLED=false
> export FINERACT_SERVER_PORT=8080
> export FINERACT_DEFAULT_TENANTDB_UID=$POSTGRES_USER
> export FINERACT_DEFAULT_TENANTDB_PWD=$POSTGRES_PASSWORD
> export BACKEND_PROTOCOL=http
> export BACKEND_PORT=$FINERACT_SERVER_PORT

Reply via email to