The rebel region of Spain that declared itself independent is holding parliamentary elections that will be a major test for the secession movement.