To do that, you'll have to pay for a server from some provider. Alternately, this site has servers you can upload your maps to for testing. You can either submit your map to a gameday (submission threads found in the Server Events subforum) or go into the group chat and submit it to an impromptu test. Then once it's played you can read the feedback by going to the Feedback tab at the top of the page.

You can also forward your ports (google is your friend here) so that when you load a map with sv_lan 0, your friends will be able to see it in the server browser and join you on it. However, if your computer isn't very good I'd recommend against doing that.

this is a funfact, when networked with LAN, testing a map online allows others to join in while you preform diagnostics. This I found to be good when we first learned to map in tf2. (I went to a summer camp). It allowed for instant feedback by others/

You could always create a server on the same or another computer on your LAN using steamcmd, set sv_lan to 0 and copy the map to that (Your going to need to know how to port forward to get them to connect properly though, so google that up). However a word of warning if you do, if your internet sucks on upload and you didn't compress the size of the map, the testers you are going to ask to help are going to have to sit through a 5 min dl or so every time you make a significant change you want feedback on.

This does give you a free server independent of your tf2 window which would help should you need to join another server briefly as it wont close down the local server like it would when you use map <mapname>.