Skip to content

Add automated system tests#34

Draft
aguibert wants to merge 4 commits into
IBMStockTrader:masterfrom
aguibert:mp-system-test
Draft

Add automated system tests#34
aguibert wants to merge 4 commits into
IBMStockTrader:masterfrom
aguibert:mp-system-test

Conversation

@aguibert

@aguibert aguibert commented Jul 16, 2019

Copy link
Copy Markdown

Runs integration tests on Portfolio microservice using several Docker containers:

  • Liberty
  • DB2
  • Mockserver (mocks external services such as the stock-quote service)

Run tests using mvn verify

Tests run in about 2 minutes on my machine. First run will take longer due to pulling necessary Docker images.

Summary of changes in this PR:

  1. Added some test-scoped maven dependencies
  2. Added AppConfig class defining test container topology/env
  3. Added PortfolioServiceTest class for the actual Portfolio service tests
  4. A bit of app-side cleanup:
    • changed to 1 JAX-RS Application. Multiple Applications is undefined by JAX-RS spec
    • made readiness endpoint not require a JWT
    • Converted Portfolio object to use JSON-B instead of JSON-P
    • used @RegisterRestClient(baseUri = "...") for defaults instead of jvm.options
    • cleaned up JWT config by removing web.xml and using @RolesAllowed annotations instead

@jwalcorn

Copy link
Copy Markdown
Member

Per Andy today:
image

@jwalcorn

Copy link
Copy Markdown
Member

Just checking back in on this. I think MicroShed has matured some since we last touched base. Can this PR be fixed up and submitted for review now?

@aguibert

Copy link
Copy Markdown
Author

hi @jwalcorn, yes MicroShed has matured quite a bit since the original PR, but there is still one more important design aspect that I'd like to solve before it's ready for prime time

@jwalcorn

Copy link
Copy Markdown
Member

OK, checking back in on this again. Are you still interested in delivering this? Of course, some of the files originally touched have evolved since 2019. FYI, I just moved everything up to 22.0.0.6 and Java 17. Anyway, let me know - thanks!

@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2025

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
C Maintainability Rating on New Code (required ≥ A)
E Security Rating on New Code (required ≥ A)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants