Add functional tests framework for API