Improving functional tests