Builds and runs tests correctly