It might be galvanised. In which case, don't try welding it!
Diagnosis? Sure - first look at it for colour and think what would make sense. Basically you'll have cast iron, mildish steel, hard steels Aluminium or Al-Si alloys, brasses (Lead-copper, etc) and bronzes (Tin-copper etc and junk metal like Mazac and other cast zinc alloys. Then there are about 3 main groups of common stainless steels. Then a million others but the above are mostly what you'll see.
Platings are likely to be zinc (galvanised), or nickel, plus a few.
A magnet will sort some of them obviously. Non magnetic stainless isn't really common, other than sinks, or in sheets, and even that can be a bit magnetically attracted.. Soft.
Density comes next, then it gets more difficult. Spark analysis is a little use, but without a surface spectrometer you're guessing after the first workings-out.
ANy alloy is going to take particularly badly to being welded. It's likely to become very soft or strangely hard and maybe brittle near your weld. Steel is an alloy, but "mild" steel has so little carbon in it it's almost pure iron. But Cast iron can be stuffed with ( a few %) carbon. Go figure.
In cast iron there's spheroidal graphite cast iron which gets called "ductile" , and flake graphite which is a sod. Wrought iron is wonderful, rare now - nearly no carbon at all. The nearest you get now is recycled Ford Cortina.
You will have all manner of trade names to confuse you. EG People think Meehanite is nice fine grained cast iron and it usually is, but the company made/makes all sorts.
Many you can guess from what they are - general purpose will be mild steel ( a very v little carbon) then low carbon steels are used for garden tools say, then more carbon in things like leaf springs. All are extremely useful as scrap if you can't get reliable supplies or prefer to womble.