How to use agent-rs and replica in end2end test?

communicating it through only command line

You can run shell commands through Rust too, you may need to make some convenience methods in your code to wrap these commands but that’s trivial to implement.

slow starting time

That’s true, but is it really a blocker to use DFX? The e2e tests will take a long time to run, but they will work.

per project per replica state

Why do you need to run your project on multiple replicas? Inter-canister query calls are run on the same replica on mainnet anyway.

For inter-canister update calls, your code should not change if you are making calls to canisters on the same subnet or another subnet. So if you want to test with multiple subnets locally then you are not testing your own code anymore, you are then testing the code of the network. You only need to test that your code works with inter-canister call on the same replica, everything else is the responsibility of the network.

I can also test my project communicating with ledgers, cmc-canister

The dfx nns extension can install all of those canisters for you.

a totally fresh replica in every tests starting

Do you mean for every test in your test suite that you will start a new replica? I think this is not necessary. If you need fresh canister state then you can just reinstall your own canister. This will be much faster that starting a fresh replica for every test.