Curtly Ambrose of West Indies bowled the longest over in test cricket against Australia in Perth in the 1996-97 series. He bowled 15 ball over which included 9 no balls.
The longest over in ODI is 17 ball over by Mohammad Sami of Pakistan against Bangadesh which included 7 wides and 4 no balls.