It depends on what type of test it is, there are many.
Steroids have different detection times, you can search online and find them. Some are much longer than others.
There are ways to cheat, depends on what type of test it is. You can mask them or alter the sample, it depends what type of test.