Flutter End2End Testing with fake web server

It is possible to have end to end testing with Flutter?
In my case I need a fake web server implementation (which I would write with package:shelf) to test that my app is responding correctly under all conditions.

The main problem that is that I don't know from which process should I start it.
As far as I know, the command flutter drive will start two processes, one for the instrumented app and the other for the test code (from which flutter connect with the main app with a driver).

I could start the shelf webserver from:

  • the instrumented app
  • the tested code
  • another process, as a dart application

My first try was the tested code, but it will start only after the instrumented app setup, and the webserver should be up and running before doing so. In the other cases I don't know how to interact with the webserver from the tested code, so I cannot find a solution for this problem.

Anyone who tried this before?