Schools Secretary Ed Balls has urged head teachers not to go ahead with their plans to boycott England's national school tests, or Sats.
He also said Ofsted inspections would be affected by the industrial action.
Mr Balls was speaking at the National Association of Head Teachers conference in Liverpool.
Conservative and Liberal Democrat education spokesmen Michael Gove and David Laws, who also appeared, both spoke of the need to reform the tests.
Head teachers plan to boycott the national school tests, known as Sats, which are normally taken by 600,000 children aged 11.
The unions claim about half of England's 17,000 schools will not stage the tests, which are used to make primary school league tables.
They are due to be held from 10 May - four days after the general election.
Mr Balls was the first of the politicians to speak, tackling the issue head on but offering no concessions after being greeted with polite applause.
"We have not agreed on every issue in the past year," he said.
"People feel sometimes the focus on narrow league tables is not fair and I agree with that."
He said he was "looking hard at the role of teacher assessment" - which the unions would like to see a greater role for - but again appealed to heads not to go ahead with the industrial action.
"I urge you not to go ahead with the boycott," he said.
Afterwards, Mr Balls told journalists that schools' Ofsted inspections would be affected if heads chose to boycott the Sats.
"Ofsted inspections will inevitably be affected," he said.
" This [the test results] is an important part of information on which they make their assessment. It will be for Ofsted to work out regarding the minority of schools which may not do the tests."
Both the Liberal Democrats and the Conservatives are against the boycott. The spokesmen did not say that to the head teachers, both instead talking of the need to reform the tests.
The Liberal Democrat's education spokesman, David Laws, drew the most applause on this - he wants to see greater use of teacher assessment in rating pupils.
He also won applause for saying that schools were in danger of becoming "desiccated exams factories".
That quickly became a pattern, with Mr Laws getting the most enthusiastic response from the head teachers overall.
For the politicians, it was a chance to face each other and an audience to set out their parties' plans for one of the key areas on which elections are fought - education.
Each gave a short speech and then faced questions from the floor which had been chosen by the union from a list submitted by members.
Most surprisingly, among the eight questions put, none directly related to the Sats boycott.
It was not quite the "elephant in the room" which no one comments on, because each of the politicians did talk about testing, but Mr Laws and Michael Gove, of the Conservatives, did not mention the boycott in particular.
Mr Gove said he was in "receive mode" and was ready to talk to head teachers.
"You cannot have a world class education system unless you trust teachers and head teachers and unless you empower them and give them freedom to flourish," he said.
Whoever is in power on Friday will have to tackle the issue as the tests are due to be taken three days later on 10 May.
The government had been looking into possible legal challenges to the boycott but does not seem intent on mounting one itself.
Instead, local authorities, as legal employers of heads in community schools, are reminding heads of their responsibilities to stage the tests and, in some cases, are threatening to take disciplinary action or dock wages.
The situation is different for voluntary-aided schools, where the governing bodies are the employers.