That picture is the Starter, when it receives voltage when you turn the key,, the gear hops up and meshes with the flywheel to turn the engine over.
These motors do have an alternator, more commonly called a Stator. Underneath the flywheel.
To test of its charging the battery properly, Get a multimeter set to DC voltage, Positive lead to +, Negative lead to - on the battery should read at least 13.2 volts while running. Of course if you can't start it, that throws a kink in that plan... At rest most batteries should have 12.5 volts.