What if someone does know a lot of halachah and wanted to earn semichah and become a posek? Are there any good semichah programs which will award semichah with just a test (as opposed to a additional time requirement for example)?
Just knowing a lot of halacha does not make someone capable of being a posek. A posek is someone who is not just familiar with the Psak Halacha in the Shulchan Aruch or the Mishna Brerura, but it is someone who is familiar with the major commentators and the reasoning behind each halacha, and how it applies to new questions.
Taking a test will NOT make you into a posek. It can give you semicha (Rav Zalman Nechemia, Rav Zafrani AFAIK offer semicha tests), but they are not meant to bestow upon someone the ability to pasken shealos. Rav Zalman Nechemia actually goes out of his way to point this out upon receiving his Semicha (at least in my experience).
The Rabanut Semicha test in Israel, which is notorious for its difficulty, also confers Semicha.
Being a posek requires two major factors 1. An intimate knowledge of the sugyos and the meforshim as mentioned previously, and 2. Shimush (apprenticeship) from an authoritative halachic expert. Just taking a test will not give you that.
There are rabbinical programs that usually require at least 2 years in the program (Rav Yitzchak Berkowitz, Rav Yosef Lerner..etc.) and there are currently alumni from those programs currently acting as Poskim.
Other programs that are actively geared towards becoming a leaders and poskim in Israel (there are Chaburos in Lakewood and Baltimore that I know of, but I am not intimately knowledgeable about them) for example are, CKD Center For Kehilla Development, run by Rabbi Leib Keleman, and Toras Chaim in Sanhedria under Rabbi Daniel Yaakov Travis. But these are long programs that require a lot of testing and a time commitment.
The short answer to sum up is that there are test to receive semicha, but there is no test to make you a posek, that requires a tremendous investment of time and Shimush.