When comparing a long barrel to a short one with the same load for differences in muzzle velocity, both barrels need to have identical dimensions inside that hole in their middle except for their length. Otherwise, several factors will fudge the numbers.
And you have to use the same lot of ammo. There's all sorts of variables that will exist for a given cartridge loaded by different folks different ways with even the exact same components; neck tension alone, for example, may go from a release force needed to get the bullet out of 5 to 80 pounds. That'll cause a big velocity difference using the same barrel.
My only "test" for this comparison was made with a lot of M852 7.62 NATO match ammo using a Win. 70 target rifle with a 26 inch hammer forged factory barrel and an M1A with a 22 inch Obermeyer custom barrel. The 22 inch barrel shot the 168 HPMK's out about 20 fps faster through the chronograph centered 20 feet away than the 26 inch one. Here's why.
22 inch M1A barrel, 4-groove, .2980" bore diameter, .3075" groove diameter, MIL SPEC chamber a tiny bit bigger than the Win 70's.
26 inch M70 barrel, 4-groove, .3005" bore diameter, .3084" groove diameter, SAAMI spec chamber a tiny bit smaller than the M1A's.
So, unless the bullet meets the same restrictions going into and through each barrel used, the "playing field" is not level.
SAAMI's document on centerfire rifle cartridge data in the following link, page 22, explains it:
Note the velocity numbers are "approximate" because different cartridges and bullet weights and the powder charges used will cause a small variance. But the numbers are good enough to make a fairly accurate estimate.
Therefore, CB11WYO, a 28" barrel may or may not shoot a give load's bullet out faster. We don't know the rifle barrel's specs the loading data was attained with. It may be tighter or looser than the one you get. On average, it would be a little bit faster.