The tests of the Israeli-built aircraft took place over land occupied by Israel but which Switzerland does not recognize as Israeli territory.
The admission is an embarrassment for the Swiss government given the country’s policy of neutrality.
In a statement, the defence ministry said Swiss delegations had paid three visits to an airfield in the occupied area in 2012, 2013 and 2015.
The visits were to test the Hermes 900 aircraft which the military wanted to buy as part of an armaments deal.
Parliament voted in 2015 in favour of buying the Israeli drones worth 250 million Swiss francs ($256 million).
The ministry said that at the time no one had realized that Pik, where the testing was taking place, was on contested ground and that the visits ran counter to Switzerland’s position on the Middle East conflict.
“There was a communications breakdown,” the ministry said.
Those who had been informed about the activities had not realized that Swiss officials were not permitted to be there and those who were aware of the restrictions had not been informed about the activities, it said.
The Blick newspaper interpreted this as meaning that the defence ministry had not consulted with the foreign ministry.
It said the revelations had caused consternation among politicians.
Carlo Sommaruga of the centre left SP described the incident as a “scandal”.
On the other side of the political spectrum, Roland Rino Büchel of the rightwing SVP said that in future the defence ministry must consult with the foreign ministry to avoid any more “embarrassment”.