Mac上的设置: 詹金斯 Maven的 TestNG的 Selenium Webdriver
问题: 从Jenkins运行测试时,我收到以下错误 org.openqa.selenium.WebDriverException: 连接被拒绝
注意:我能够从Eclipse运行相同的套件xml而没有错误。
代码:
$entered = "PHP started";
$tmpFilePath = $_FILES['userfile']['tmp_name'];
$uploaddir = 'public/';
if ($tmpFilePath != ""){
$newFilePath = $uploaddir . basename($_FILES['userfile']['name']);
if(move_uploaded_file($tmpFilePath, $newFilePath)) {
$uploaded = "Upload OK server side";
} else {
$uploaded = "Upload failed server side";
}
}
// Prepare response, close connection and send response to front-end
$array['Response'] = array(
'entered' => $entered,
'tmp_path' => $tmpFilePath,
'new_path' => $newFilePath,
'file_name' => $_FILES['file']['name'],
'uploaded' => $uploaded
);
echo json_encode($array);