A secret door opens up. A trigger is pulled. A four-barrel machine gun blasts a spray of rounds into midair. This is what it looks like when an F-35 Lightning II fighter jet fires its guns into the wild blue yonder.

The first-ever airborne test of the U.S. Air Force's F-35Awas conducted on Oct. 30 in California. It was the first of a series of trials meant to test the functionality of the jet's internal 25-millimeter machine gun, according to Lockheed Martin, the defense contractor that developed the fighter jet.

The plane is equipped with a four-barrel machine gun, which remains hidden under a trap door in the left wing of the plane, near the cockpit, until it's time to fire. During last Friday's test, the gun fired one 30-round burst, followed by two 60-round bursts. [Supersonic! The 10 Fastest Military Airplanes]

But before the gun could be tested in the air, engineers at Edwards Air Force Base in California tested the gun's capabilities on the ground. The weapon was installed on the aircraft and then was put through 13 different trials before it was cleared for takeoff. Now, the F-35 and its artillery will go through another series of tests in the air to evaluate how the gun performs in various flight conditions and aircraft configurations.

In a video taken after the first test flight, F-35 pilot Maj. Charles "Flak" Trickey said that, for the initial test, engineers were making sure the "functionality, loads [and] fiber acoustics" worked. And the test went well, Trickey added — "about as smooth as you could have expected on the first flight."

In real combat, the gun can be used to shoot targets on the ground or in the air, and test pilots will demonstrate these capabilitiesin the months to come. The F-35 is loaded with sensors that will help pilots locate targets, and this information is displayed on a helmet-mounted display screen. But for now, the F-35's machine gun is just shooting into empty space — the gun isn't expected to be fully operational until 2017.

Story continues

Follow Elizabeth Palermo @techEpalermo. Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.

Copyright 2015 LiveScience, a Purch company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.