Let's take a logical approach, followed by some sources.
I would submit that we do not have free will in our dreams. I would also submit that if dreams were a valid ground for testing us, then real-life tests would be redundant, which would lead to inconvenient conclusions, i.e. that it is unnecessary.
The standard notion of a test involves a real life situation with real life consequences. If we fail, someone gets hurt, sometimes badly. If it were possible to accomplish the same in a dream, then real life tests would be an unnecessary evil.
There is no reason to presume we have free will in a dream. Only when we have explicit examples of genuinely prophetic dreams like Rambam (which is highly disputed among Rishonim), can we make a single-case presumption that he had real free will. Otherwise, we should view dreams as nothing but cloudy, static-filled noise.
As Ramchal states in Derech Hashem 3:1:6, most dreams do contain a small element of truth and prophecy, but so little that it is irrelevant to most people as it's too hard to pick out the true bits from the noise. If one has a dream, Chazal ask us to go to someone to interpret it for the good, and the meaning goes on the interpretation (Berachot Perek 9)1.
At most, view dreams as insight to where one is at. Without actually performing an action, a Jew is not held accountable as if he sinned (see Kiddushin 40a2), and a dream is just an intention at best, and even that is dubious as we haven't got proof there is free will in dreams. So at most - and this is a stretch - take it as a warning that one still has some temptations and risks in a certain area and if the situation would arise, a part of them is in danger of repeating the performance that occurred in the dream. The same goes in the converse as well; if someone surpasses a test in a dream, then great, take the confidence boost, but don't read too much into it or relax in that area.
I say at most, but try to not interpret it that way. Dreams are too full of noise and rubbish and made up situations that may or may not reflect reality. Take a few steps to try to improve in those areas but otherwise don't lose sleep over it.
If one is concerned, go and speak to one's LOR for advice, and say some tehillim or recommended berachot, found in many siddurim (often near the mi-sheberach sections, or in the "additional supplication" sections), and then forget about it and continue as always, trying to keep the mitzvot as best as you can. See here for more information on this. Hatzlacha.
1 - in that spirit, may the dream you had be nothing but a good siman!
2 - although it is if it is a positive mitzva, so IF there is free will, then perhaps this would be an interesting avenue to explore regarding your question, notwithstanding the rest of the points being made here