Polling stations have opened in a crucial by-election which is set to provide a major test for Sir Keir Starmer's leadership.