LONDON (AP) _ Voters in southeastern Wales cast ballots today in a special parliamentary election viewed as a test for Prime Minister Margaret Thatcher's Conservative Party in what had been a Tory stronghold.

Balloting in the district of Brecon and Radnor was seen by analysts as a referendum on Mrs. Thatcher's popularity midway through her second five-year term, and a Tory loss was deemed likely.

Four out of five polls during the final 21/2 weeks of campaigning showed the opposition Labor Party's candidate Richard Willey leading the Conservative, Christopher Butler, by up to 19 points.

Results from the 1,200-square mile district of just 48,800 voters - who are outnumbered 20-1 by sheep - were not due until Friday because of the remoteness of some villages.

Mrs. Thatcher's position has been sapped by her inability to stem nearly four years of record unemployment, now running at 13.1 percent, and the revival of the Labor Party, with a more united and moderate image since its crushing defeat in Britain's June 1983 general election.

In 1983 the Conservative, Tom Hooson, captured 48 percent of the vote, with Labor getting 25 percent and the alliance 24 percent.

This year's special election will fill the vacancy created by Hooson's death May 8.