To test your DSLR sensor, point your camera at a blue sky with the lens set to a narrow aperture.
With the lens focused to infinity, take a few photos of the blue sky.
Either using the rear LCD screen or your computer, check every part of the image for spots as these are signs of particles on the sensor.
If you see spots or streaks in the image, the sensor must be cleaned.