One option could be to use the built-in chirpstack server, though you’d need to fulfill all the requirements of LoRaWAN, such as registering the details of a device in the server and having the device under test transmit a valid frame count within that - you can’t really keep sending packet framecount zero over and over again.
Or else write your own program (python is a good choice) that speaks the Semtech UDP protocol of the classic packet forwarder.
A test where you can determine (or at least know) the particulars of the test packets being transmitted could also be run with a node-type radio as the tester. What the gateway radio offers is flexibility of receiving packets on any of 8 frequencies at an unknown spreading factor - a flexibility key to implementing actual LoRaWAN over the air. But depending on the automatation/instrumentation of your factory test, you could potentially turn a modified copy of your product into the the test rig to exchange known raw packets with the DUT.