What is the purpose of a spark test on a sample of material:

What is the purpose of a spark test on a sample of material: