Is there an easier way to test a package after finishing code writing?

That still opens up the UE4 editor.

Is there no way to open a game without opening the editor?

In UDK we used something like this in a .bat file to open the game without opening the editor.

D:\UDK\Binaries\Win32\UDK.exe Untitled1?GloadScore=0?TimeLimit=0?Game=GameBase.GameType -log