How to best mine on a smartphone? As you perhaps already know, mining started at the beginning with processors then graphic card.

I want to try to mining on a smartphone. Which electronic component will be the best to calculate hash? Processor or graphic component?

The purpose is only for testing on testnet and get the best performance.

Keywords such as mining and smartphone don't bring me any relevant results via Google.
Mining on a smartphone is unfavourable and might drain your battery very fast. For bitcoin-mainnet and bitcoin-testnet don't even try to mine on a smartphone (it won't be fun).

If you like to do this for testing or research purposes, you probably should use your smartphones GPU over openCL or renderScript.
Also have a look at bitcoin-cores mining code if you like to know more about how mining works (in detail).