When implementing WCAT for load testing for the first time I ran into the overly vague error message below.
All clients connected, Test beginning.
Invalid code received.
message: Run error detected, terminating clients...
message: Terminating all instances of wcclient...
message: Terminating all local instances of wcctl.exe...
Nothing I did seemed to let me get anymore information to help me zero in on the issue. After spending a significant amount of time troubleshooting, I started the client in one window using the command below
wcclient localhost -b
Then I opened a separate cmd window and ran my job using this command
wcctl -clientfile ubr\scenario.ubr -settingsfile ubr\settings.ubr
Obviously, you need to point to your files in their relative locations, but that's what I ran. The big thing, is that by running it this way, instead of through wcat.wsf you will actually see a useful error message. In my case, missing s semicolon on line 149.