Daniels Run Elementary School third-graders Zara Kashmiery (center) and Saif Mahmud learn to code. (Tin Nguyen/Fairfax County Times).

Girls outperformed boys on a national test of technology and engineering literacy that the federal government administered for the first time in 2014, according to results made public Tuesday.

Among eighth-grade students in public and private schools, 45 percent of girls and 42 percent of boys scored proficient on the exam, the National Assessment of Educational Progress, or NAEP. Overall, 43 percent of all students were proficient.

The test was designed to measure students’ abilities in areas such as understanding technological principles, designing solutions and communicating and collaborating. Girls were particularly strong in the latter.

There also were large racial and socioeconomic achievement gaps, mirroring results on standardized tests in other subjects. Just 25 percent of students who received free and reduced-price lunch scored proficient, compared to 59 percent of more affluent students. Eighteen percent of black students and 28 percent of Latino students scored proficient, for example, compared to 56 percent of white and Asian students.

The test was particularly difficult for students learning English as a second language: Five percent of them scored proficient. And 60 percent of private school students were proficient, outperforming their public-school peers, 42 percent of whom were proficient.

NAEP, also called the Nation’s Report Card, is best known for providing information every two years about student performance in math and reading. In 2015, 34 percent of eighth-graders were proficient on the NAEP reading exam, and 33 percent were proficient in math.

The results on the new technology test will serve as a baseline that will allow educators and policymakers to track students’ problem-solving, communication and technology skills over time.

The test was administered to a representative sample of 21,500 students in more than 800 schools nationwide. It was a computer-based test that asked students not only to answer discrete questions but also to perform tasks embedded in real-life scenarios such as designing a safe bike lane, engineering a healthy habitat for a classroom iguana named “Iggy,” and creating an online museum exhibit about Chicago’s history of dealing with water pollution.

In a survey administered with the test, nearly two-thirds of students said that family members were their primary teachers on how to build and fix things.