ふりをする: deliberately acting unlike the real situation
Use ふりをする for pretending. Track ongoing, completed, and negative content within the pretense, and distinguish it from merely appearing to be in a state.
Identify what is being pretended
弟は寝ているふりをしています。 means that the speaker's younger brother is pretending to be asleep. 寝ている is the state he is presenting, not a report that he really is sleeping.
The final する supplies the tense of the act of pretending. 寝ているふりをしていました。 places pretending to be asleep in the past, so check the tense before and after ふり separately.
Pretending completion or a negative state
宿題が終わったふりをしました。 means that someone pretended their homework was finished. 終わった marks completion within the pretense; read it together with ふりをした to avoid mistaking it for actual completion.
聞こえないふりをして、返事をしませんでした。 means that someone pretended not to hear and did not respond. The negative 聞こえない belongs to the pretended state, not to an assessment of their actual hearing.
Connections and mere appearances
Nouns connect with の, as in 学生のふりをする, and na-adjectives with な, as in 平気なふりをする. 平気なふりをしました。 means pretending to be fine, drawing attention to the difference between actual feelings and outward behavior.
眠そうです。 is an observer's impression that someone looks sleepy. 眠そうなふりをしています。 adds deliberately acting so as to look sleepy, so distinguish an impression from intentional pretense.
Quick check: Is 分かったふりをしました。 evidence that the person definitely understood?
Show the answer and why
No. It says that the person pretended to understand, so it does not confirm real understanding. Even 分かった must be read within the whole expression including ふり.

