This is because, "My test is finished," is a state in what the test is in. This can be compared to, "I am finishing my test," in which you are doing an action to the test rather than describing a state.
が is normally used to describe things, while を is normally used when you are performing an action on something.
Another way to put this is the difference between transitive and intransitive verbs.
が is normally used for a transitive verb. For example: The door opens. = ドアが開きます。 [Hirakimasu = Open (intransitive)]
を is normally used for intransitive verbs. For example: I open the door. = 私はドアを開けます。 [Akemasu = Open (transitive)]
I hope this helps.