How to understand the role of testval, why this parameter greatly affects the model?

You can set the testval to control where the sampler starts. You should usually not do this, and if your choice matters than that is a pretty sure sign that sampling isn’t working properly for at least some of your starting values, and probably for all of them. Do you have a concrete example where you face a problem like this?