As of now, objective methods to detect sentience do not exist.
Sentience is the capacity to experience feelings and sensations, but there are no instruments that can detect whether something/someone has that capacity, nor to detect existence of any sort of feeling or sensation (also known as qualia), be it experienced or not. No one knows what stuff they are made of, not even so much as to be able to tell whether existence of that stuff can be detected with any physical instrument ever.
It is relatively easy to study how something going on in the brain correlates with what a [human] test subject experiences: when the subject is seeing specific colors, their brain exhibits certain activity patterns. Thus it is possible to map brain areas and the corresponding qualia.
However, no one has been able to formulate any scientifically testable hypothesis as to why activity patterns are associated with specific experiences. Not only pertaining to specific things going on in the brain, but even in the broader sense: why and how things are being experienced in the first place. This is the hard problem of consciousness, and the missing bridge between the physical and sentient is known as explanatory gap.
As far as we know, anyone can be a so-called philosophical zombie: something that looks like a person and acts like a person, but has no inner life at all. Basically a robot that physically is 100 % human, completely indistinguishable from one, but completely void mindwise: not seeing colors, only processing visual information, not hearing sounds, only processing auditory information etc.
The only reason we can do that mapping of neural correlates is because our test subjects can give feedback about their experiences and we trust that the feedback is what we would give if we were the test subject experiencing blue directly when we would say "I see color blue". There is a very serious leap of faith involved in the process.
So, as of now, and maybe forever, the situation is as follows: even if we can detect something in a living being that is very likely associated with experience, there is no way to tell for sure whether any sort of experience in fact goes along with it.
This can lead to very different two conclusions and two very different approaches:
- a compassionate one: sentience is taken for granted, and every lifeform is considered [potentially] sentient and treated accordingly, or
- a nihilistic one: if you cannot measure it, it does not exist, therefore alien lifeforms are deemed non-sentient, unless there is a very good reason to assume otherwise
The first one can be based on panpsychism: the view that the whole universe is sentient in some sense, and the sentience we are aware of (which we actually take for somewhat granted) arises from it, and so does sentience of every other lifeform, too.