As per agile standard, though we are trying to keep the story small enough sometimes it is not possible to close the story including the testing in the same sprint due to unavoidable situation. So the story is moving to next sprint, but the issue is the effort spent on the current sprint is also moving to next sprint and it is not giving the correct velocity of the team.
Is there a way to resolve this? I am sure most of the developers are going through same kind of issues.