For Electrum testnet on Windows OS:
Right-click the Electrum shortcut; In the Properties-Shortcut, edit the Target column by adding the following text at the end:
Although, I am using Windows OS. On my laptop, which was window 10, I noticed when I downloaded Electrum on it when I bought it 2 years ago or so, the testnet was created automatically.
I got another laptop running Window 11 which I have just downloaded Electrum on recently which you can see from above image. The testnet also was created automatically.
And both the Electrum and the testnet Electrum works perfectly. I do not know of MacOS, but I do not think that is necessary anymore on Windows OS.
Opening Electrum Testnet on Windows OS will be easier because, by default, a shortcut is provided in the start menu.
What I mentioned above is another alternative way to access the Electrum Testnet on Windows OS.
For MacOS, by default, you will not find Electrum testnet shortcuts, unlike Electrum for mainnet networks. To access it using the command line, as I mentioned before.
Meanwhile, Electrum testnet on Linux (Ubuntu), you can use the following guide (I haven't tried this myself):
https://bitzuma.com/posts/a-beginners-guide-to-the-electrum-bitcoin-wallet/#testnet-on-ubuntu