Why not? the battery just like a capacitor in the charging circuit and could be the only significant load of the alternator, disconneting it could cause voltage surge that burns alternator's rectifier.
You don't have to disconnect the battery ro test alternatior's output. If the voltage across the battery is less than the battery itself while the engine is running, you know the alternator is bad.