Guinea pigs are commonly used in scientific experiments, so both 'white mouse' and 'guinea pig' can metaphorically refer to a test subject.
Tips
memory
豚 = pig/piglet (as in 海豚 dolphin, literally 'sea pig'), 鼠 = mouse/rat. So 豚鼠 is literally a 'pig-mouse' — an apt description of this plump, squeaking rodent.