配置Jenkins以进行selenium Web驱动程序测试

时间:2018-01-17 14:13:38

标签: maven selenium jenkins

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);

error message

0 个答案:

没有答案