Why would space travelers "go native" and start eating food that grows on an alien planet?
If their spaceship can keep them alive on the journey to an alien planet presumably it can keep them alive while exploring the alien planet and on the journey back to where they came from.
Presumably the spaceship would have food synthesizers to convert stored materials and waste materials into food and water and enough energy to run the food synthesizers countless times.
Presumable the alien solar system would have many small bodies, comets, ring particles, asteroids, and meteoroids, and many of those small bodies would contain many of the elements and compounds which could be used as raw materials by the ship's food synthesizers if raw materials storage units on the ship leaked and lost a lot of material.
So space explorers would probably not have much need to test alien life to see if it is nutritious and non poisonous.
Maybe people intending to colonize the planet would want to eventually know what native foods are safe to eat.
There are two possibilities.
One, they are headed for a specific planet which they know they can colonize. Presumably they would have extensive reports from explorers about which native plants are edible before choosing that planet.
Two, they are on an expedition looking for a suitable planet to colonize, either for themselves to colonize or else to report as safe for colonization by other persons. Then they would have to do a lot of tests on the native biosphere.
First they would analyse a lot of sample of the atmosphere and water from all regions of the planet and all the various types of habitats, looking for concentrations of harmful chemicals.
Then they would have to inventory all the plant life on the planet, classifying and cataloging thousands and probably millions of species. And a specimen of each species of plants would have to be chemically analysed both for nutritious chemicals and for poisonous chemicals. Confounded by beige's answer suggests a series of various types of tests.
If a strong lack of nutritious chemicals and/or strong presence of poisonous chemicals is detected early in this investigation, the planet will probably not be suitable for colonization, so some planets can be eliminated from consideration. And if the investigation continues long enough for the planet to be cleared for colonization, there will already be a long list of which plants and plant parts are edible, and which are not.
But of course colonists might not want to "go native" and eat plants that grow on the planet. They might simply take gaseous, liquid, and solid matter from the planet and put it into machines that separate it into separate elements. Elements useful for making machines and other items will be sent to 3D printers that can make what they need and desire, while elements useful for making food will be sent to food synthesizers. All of the colony's waste materials will be recycled into the matter supply for the colony.