Testing Silver and Gold

Does anyone have an idea of how I can test something to see if it is
genuine sterling or fine silver and/or to find out the amount of
karats of gold (if any) there are in it? I would like to know this so
that I will be able to test items to see if items that are advertised
as silver or gold really do contain these materials when I am
traveling around the world or visiting a new wholesaler that I am
unfamiliar with. Also, it would be great if the recommended testing
method would not involve destroying the jewelry – i.e. melting it or
some other testing method – because I would like to test before I
buy.

Thanks so much.