public function collectAndSendCoverage($args)
    {
        // Collect and write out the data
        $this->collectAndWriteCoverage($args);

        if ($this->valid($args)) {
            extract($args);

            // Get the realpath coverage directory
            $coverage_dir = realpath($coverage_dir);
            $coverage_output = $coverage_dir.DIRECTORY_SEPARATOR.self::COVERAGE_OUTPUT;

            // Send it!
            $this->printer->out('Sending coverage output...');


            // Workaround for cURL create file
            if (function_exists('curl_file_create')) {
                $payload = curl_file_create('json_file', 'application/json', $coverage_output);
            } else {
                $payload = array('json_file'=>'@'.$coverage_output);
            }

            $ch = curl_init(); 
            curl_setopt($ch, CURLOPT_URL, $target_url); 
            curl_setopt($ch, CURLOPT_POST,1); 
            curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);

            // Save output into output buffer
            ob_start();
            $result = curl_exec ($ch); 
            $curlOutput = ob_get_contents();
            ob_end_clean();

            curl_close ($ch); 
            $this->printer->printOut('cURL Output:'.$curlOutput); 
            $this->printer->printOut('cURL Result:'.$result);
        }
    }