Fix test automation to avoid server running forever and to run on all platforms including GitLabCI/AWS