I found that one solution for this issue is to check the listen address of the server. From the console go to the Mydomain --> Environment --> Servers --> AdminServer. Then check the Settings of the AdminServer --> Configuration --> General. I found that the Listen Adress is empty. The fix is to enter localhost as the value for Listen Address and save the change as the below:
In order to make this change effective I need to restart the server. After the server is restarted I can use the test console in OSB console now.