Everytime you run grunt docker-test-midway-backend
, it will spawn containers, run midway tests then remove containers.
It would take time if you run that command multiple times. In fact, you just have to spawn containers once,
run the tests multiple times then remove the containers when you finish.
Spawn the containers (AKA prepare the testing environment):
grunt setup-environment setup-mongo-es-docker
Run the midway tests:
grunt run_grunt:midway_backend
Clean the containers:
grunt kill-containers clean-environment
In fact, we do not recreate containers after every test case so this way gives no more risks IMO.