Collection - Mock Server 1
API - Mock API 1
Now this API has a Pre-Request and Test script which runs when I am hitting the API from Postman. But if this API is working under a mock server and it is being hit by some other place, the Pre-Request and Test scripts do not run.
How can we run those scripts in case these APIs are hit from an external source?
Hey @payload-candidate-42 
Welcome to the Postman Community! 
The Mock Server wouldn’t run those scripts, as a stand alone external request, outside of Postman. The Mock URL is only returning the matching example when you hit that directly.
If the Mock Server URL and the configured routes were added to Requests within a Collection, then you ran the Collection with the Collection Runner, a Monitor, etc. It would run the scripts within the request.