Salesforce Integration and login url

Salesforce Integration and login url

Hi,

Is it possible to change the url used for salesforce integration? 
It seems it is possible to only point to login.salesforce.com which is a production url, how we manage the test url?
We need to integrate with the test sandbox which it has a different url: test.salesforce.com.