What is recommended way to write client JUnit test...
# kilua
n
What is recommended way to write client JUnit tests? AI generated something and it is working, but I don't like hardcoded names:
Copy code
val response = testSetup.createTestClient().rpcCall("AuthentificationService.auth", login, password)
r
Hi. I need more context. What do you want to test?
n
I want to have integration tests, where I could test each endpoint without browser.
r
Never tried that myself 🙂 Generally speaking I treat RPC internals as a black box. I would probably just test the server component itself and create a fake/mock for client testing.
For the integration tests of the real http endpoints some kind of jvm rpc client would be needed, and I'm afraid there is none.
n
I had this separation for couple projects and it worked really well. Especially for ensuring authentication flow, where I want to know if my given setup actually works.
r
It definitely would.