For the integration test, you can use pocket-ic.
With it, you can write tests in Rust—for example, here is the suite of OISY’s backend—but also in various other languages such as JavaScript with pic.js as for example, here is the test suite of Juno.
I don’t know if it’s the best practice, but I believe this is a good approach to scope the tests for your backend.
If in addition you also want to add some E2E tests because you have both a frontend and a backend that runs on an IC instance, a handy plugin to automate sign-in with II is the internet-identity-playwright.