(Adds additional information about the test and the reaction by shares of BP, Transocean and Anadarko Petroleum.) By Donna Kardos Yesalavich Of DOW JONES NEWSWIRES NEW YORK (Dow Jones)--BP PLC's (BP, BP.LN) U.S. shares jumped Thursday afternoon after the oil giant said the flow of oil into the Gulf of Mexico was halted during a test to see whether a recently placed cap on the well can entirely seal it off. BP's American depositary shares closed up 7.6% at $38.92, the stock's highest level since June 4. It continued to climb in after-hours trading, recently up 0.6%. After hitting a 14-year low in late June at $26.75, the stock has recovered 36% of its slide since the April 20 explosion of the Deepwater Horizon rig. BP's shares had been up through most of Thursday's session on hopes for the test, which had been delayed from earlier in the week, to begin. The stock moved higher after the company confirmed it began the test and spiked once BP said no oil was flowing out of the broken well into the Gulf of Mexico. "Ending the risk of further spillage is an important step in rehabilitating the stock," Citigroup Global Markets analysts told clients in a note. Shares of other companies connected with the Gulf of Mexico spill also got a boost from BP's announcement. Transocean (RIG) closed 4.5% higher at $54.70, although it slipped 0.4% in recent after-hours trading. Anadarko Petroleum advanced 3.2% to $49.08, and rose another 0.6% after hours. Transocean is still down 41% from its April 20 close, while Anadarko is off 34% from then. The gain in Anadarko helped push the energy sector of the Standard & Poor's 500 into positive territory; the sector closed with a 0.04% gain after it spent much of the trading session in the red. Anadarko was the best performer in the sector. BP is testing the ability of the well to withstand pressure and remain sealed, without oil leaking out. The test could take anywhere from six hours to two days, BP said. The company emphasized that the purpose of the test is to find out how strong the well is. "The stock is starting to price in the fact that they are eventually going to get this leak stopped," said Andrew Fitzpatrick, director of investments at Hinsdale Associates. "They seem to be a little ahead of schedule with that." Still, Kent Wells, a BP senior vice president, cautioned that the test had just begun at 2:25 p.m. Central time Thursday. There were still many milestones yet to reach before the company would be able to conclude that the cap could seal off the well and keep oil from flowing into the ocean, or alternatively, that the company would have to restart containment operations to collect oil from the well. "Controlling the well and stemming the oil flow is critical in giving some closure on the extent of the spill and should allow the assessment of costs to begin," Citigroup said. The start of the test has been eagerly awaited as BP has worked around the clock for three months to contain the spill, which has brought economic and environmental devastation to several coastal states. -By Donna Kardos Yesalavich, Dow Jones Newswires; 212-416-2188; donna.yesalavich@dowjones.com (Cassandra Sweet contributed to this article.) (END) Dow Jones Newswires July 15, 2010 17:57 ET (21:57 GMT)