Testing on selector file

I have used selector in my component implementation. I want to know How to perform testing on selector files

If by “selector” you mean a StateListDrawable… that is a resource. Usually, we do not test resources. We might test the application of a resource, such as testing the results of inflating a layout, but usually we have a difficult enough time finding time to test actual code.

In the specific case of a StateListDrawable… in theory you could write an instrumented test that uses findStateDrawableIndex() to try to determine if you wrote the selection rules correctly. I have never done this and I do not know if would be practical.