Since the "iolib:badbit" error is related to printing to iostreams, please check the following:
1. What is the duration for which the test is run?
- If you have a long simulation time: Does the error still occur when reducing the duration?
2. Is the harness model producing text output to the MATLAB command window when run outside of Simulink Test Manager?
- Might there be forgotten semicolons in m scripts?
- Or is any other logging information printed during the simulation run?
- Might there be a modeling issue that causes many messages to be generated under certain conditions?
Anything causing the output stream to be too long will lead to this error.
Please check your model regarding the hints given above (specifically under item 2).