Cepheid, a molecular diagnostics company that develops genetic tests and other products, said Thursday it earned $1.8 million in the second quarter thanks to rising sales of its GeneXpert DNA testing system.

The results and Cepheid's full-year outlook topped Wall Street expectations and the company's shares jumped 11 percent in extended trading.

The earnings, of 3 cents per share, compare with a net loss of $1.8 million, or 3 cents per share, in the same quarter a year ago.

The results from the latest quarter beat the expectations of analysts polled by FactSet, who forecast a second-quarter loss of 2 cents per share.

Sunnyvale-based Cepheid said revenue rose 34 percent to $67 million. Analysts had forecast revenues of $61 million.

Cepheid said it installed 148 GeneXpert systems in commercial clinics and 38 systems in developing countries during the quarter. A total of 2,224 systems have been sold as of June 30. Gross margin on product sales was 54 percent, up from 48 percent in the second quarter of 2010.

The company said it expects full-year net income of 8 to 11 cents per share on revenue of $265 million to $270 million. Analysts are expecting 5 cents a share on revenue of $255.1 million.

Cepheid shares rose $3.37 to $35 in after-hours trading.