At its base websocket is a TCP connection, there’s no OOTB step for setting up a TCP connection. You would have to resort to an Execute Script step.
How complex it would be depends on the complexity of the message exchange you need to have over the websocket.
If it is kind of a fixed communication, example you connect as a client, send one message, expect one answer, close the socket and that is it, then that complete message exchange can be in one script. Do a Google search for “java websocket client example” you will find some examples (e.g. on StackOverflow) where the javax.websocket class is used. It looks like it is not that complex, with a couple of lines you can set up a connection send something over.
If the communication is more complex, maybe you want to loop over an excel file for an arbitrary number of data rows which need to be sent over the websocket then you can’t limit this to one step, so this means you will have to create your websocket object and store it in testExec using setStateObject(). Now everytime you need to send a message over the websocket you need to put an Execute Script step, in that step retrieve the websocket object with testExec.getStateObject() before sending a message.
Cheers,
Danny