Change the way how tests fail on stderr output.

Wait whole message from stderr output and only after that throw error. This helps to get whole picture why test fails.