Hi,
Sorry to read about your fatalities.
You mention you'd had your "tank set up for about 3 weeks" - do you mean that you cycled the filter beforehand, then added the fish 3 weeks ago, or did you just set up the tank and add the fish all within the space of a few days? The reason I'm asking is that before adding fish, the filter needs to be cycled in order to be able to process the waste from the fish. This process takes 4-6 weeks although can be shortened if you were able to get hold of some mature filter media from another fishkeeper. This article
http://www.fishkeeping.co.uk/articles ... hless-cycling-article.htm should explain the process and rationale for cycling the filter for you.
If you didn't cycle the filter beforehand and therefore are doing a fish-in cycle, then this is a very "hit and miss" method and is without doubt the most likely cause of your fatalities. Fish can survive a fish-in cycle, but only with very careful monitoring of water (twice daily) and daily water changes over the 6ish weeks, to keep ammonia and nitrite at 0 and nitrates under 20ppm, if at all possible. If ammonia, nitrite and nitrate are above these levels, they're toxic to fish and so result in illness and death, often quickly. Seachem Prime is a good water conditioner, especially for during a fish-in cycle if you've found yourself doing that - as well as dechlorinating water during water changes, it can detoxify the toxic effects of ammonia, nitrite and high nitrates on the fish.
Although you did a water test, it's only valid on the day and time you did it, and a reading later on in the day could have had much higher results for these crucial tests - ammonia, nitrite and nitrate. [Additionally, and this may not apply in your case, but worth other new fishkeepers knowing, is that multi-test paper-based test strips don't actually include ammonia which is the most crucial reading of them all, so some new fishkeepers think their water is ok when in fact they have no idea what the levels of ammonia are.]
Aside from this, the tank will need to be a suitable size for the fish. You will need to work out what fish you have/had, and read the Caresheets and Articles (left-hand-side of this forum) in order to see what the requirements of the fish are in terms of tank size, diet, minimum numbers of each species, etc, otherwise they won't fare well. As a starter, guppies and mollies are hard fish, so require hard water. You'll be able to find out if your water is suitable for them either by a test kit or by checking your water hardness level on your water supplier's website and inputting your postcode.
Hope this is helpful, but, once you've read the link above, looked at the caresheets and articles, and checked your water hardness, do feel free to come back with further questions and we can advise further.