I once sat in the Lillee-Marsh Stand at the WACA ground in Perth and watched Curtly Ambrose bowl an 18 ball over versus Australia. Is this the longest over bowled in Test Cricket? Ambrose played in three Perth Tests and I eventually tracked down the over you witnessed. According to the excellent Allan's Australian Cricket Annual it was a 15-ball over (not 18) containing 9 no-balls and it took 12 minutes to bowl. Allan Miller describes it as 'perhaps the longest over in Test cricket'.
In terms of balls bowled I have no record of a longer one but such things have not always been noted in match reports and only a detailed examination of the score sheets of all Test innings would produce a definitive table. The closest I have on record is the 13-ball over (3 wides, 4 no-balls) delivered by GOB 'Gubby' Allen v Australia at Old Trafford in 1934.