If you want to do something after every commit (of an object of a certain entity) you can use an event handler:
https://docs.mendix.com/refguide/event-handlers
Hello Sujat,
Please resort to https://docs.mendix.com/appstore/modules/unit-testing#5-running-unit-tests-through-the-remote-api to run your tests after a commit.
To retrieve commits use the team server api https://docs.mendix.com/apidocs-mxsdk/apidocs/team-server-api#3-3-retrieve-revisions