The article and the ending change from "der Test" to "des Tests" in the so-called "fourth case" (or genitive). Do you remember which skill you saw this sentence in? It shouldn't come up before that grammar concept is introduced.
That would be "Thank you for the test..." which is similar, but the original sentence means something else: "Thanks to the test..." as in "Due to the test I now know what to study". Does the difference make sense?