Can I package a game test build as client with "built-in" dedicated server?

Basically I am after the same functionality I get by checking the box “Run Dedicated Server” in the PLAY-menu, but when packaged.