Hi again the OED puts it back even further and, as well as giving Smyth's definition, gives another:
2. Naut. a. A midshipman in the East Indian service. b. An inefficient seaman.
1747 "Adv. Kidnapped Orphan 69" He sent his nephew, at the age of fourteen, on a voyage as a Guinea-pig. 1748 Smollett "Rod. Rand." xxiv, A brave fellow as ever crackt bisket;�none of your guinea pigs. 1840 Marryat "Poor Jack" xxvi, The midshipmen, or guinea pigs, as they are called. 1867 "Smyth Sailor's Word-Bk.", Guinea-pigs, the younger midshipmen of an Indiaman.