The frequency response of electronic components with inputs and outputs can be measured using the loopback function (a.k.a. Soundcard Calibration). Perhaps those with more electronics experience than I have can comment, but I see no reason why it wouldn’t work for an amplifier too, provided you have a soundcard that can take the high input wattage, and a dummy load is used on the amplifier.
(Edit - just noticed you're talking about a tube amp. I know nothing about them, this might be a bad idea.)
I am not an expert. Please use the info in this post at your own risk!
Check pg.105 of this REW guide for measuring pre-outs. As Wayne suggested, someone with more experience might pipe in, but I believe you'd need to set the Windows microphone control low enough as to not overload the input back to REW. Even so, I also believe you'd still be in danger of damaging the input, because power amplifier output voltages are much higher than line-level ones, limited only by their power supplies. So if your amp has +/-40V rails, then it can develop slightly less than that at its outputs. Certainly enough to destroy a delicate sound card input. You might be able to string a few resistors in series as a properly-rated load, which would allow a sufficiently low voltage to be tapped-off, but once again - I'm no expert.
I use REW for noise floor and distortion response with the spectrum analyser. So far I've only used the Measurement loopback for determining the frequency response of my USB soundcard and signal probing preamp and probes, but it would work for any equipment within the loop back path.
This scheme requires the soundcard line out to be interfaced with the amp's input (so you may need attenuation, or gain). And then the amplifiers output to interface with the soundcard mic/line input, again using an attenuator - I use a soundcard preamp for this - there are a few diy designs around.
Input and output levels do need to be withing equipment ranges, so it does require some cross-checking to ensure no clipping. The REW Measurement process includes meters and signal amplitude advice and signal output adjustment. Frequency response at the high end is limited by the soundcard response and any probe frequency response. The low end goes down to 2Hz, which suits my interest in Williamson amp where response peaking is an issue.
With care, shall we say with extreme care, REW can be used to make measurements at any point in a system, including power amp outputs. The details will depend on the nature of the measurement to be taken. This is not a task to be undertaken by the inexperienced. Even with detailed instructions, there are plenty of ways to blow up and amp or speaker.