The simple thing is, stop weed before the test for weeks. If you are in a situation where the test is so close and u didnt stop yet. Search for detoxing from weed i remember water and lemon and another ingredients can help bypass the test.
Keep in mind weed have its own side effects and if stopping it is an option, that would way better than just bypassing a test.
Cheers!