Beispiel #1
0
$tcaseStatusCode['departed'] = 'd';
// Substitute for tcid and tpid that apply to your project
$unitTestDescription = "Test - Call with valid parameters: testPlanID,testCaseID,buildID";
$testPlanID = 222;
// $testCaseID=185;
$testCaseID = 58;
$testCaseExternalID = null;
$buildID = 15;
// $status=$tcaseStatusCode['departed'];
$status = $tcaseStatusCode['blocked'];
// $status=$tcaseStatusCode['wrong'];
$exec_notes = "Call using all INTERNAL ID's ({$testCaseID}) - status={$status}";
$bug_id = '999FF';
$debug = false;
echo $unitTestDescription;
$response = reportResult($server_url, $testCaseID, $testCaseExternalID, $testPlanID, $buildID, null, $status, $exec_notes, $bug_id, $debug);
echo "<br> Result was: ";
// Typically you'd want to validate the result here and probably do something more useful with it
// print_r($response);
new dBug($response);
echo "<br>";
//
//
// // Now do a wrong build call
// $unitTestDescription="Test - Call with at least one NON EXISTENT parameters: testPlanID,testCaseID,buildID";
// $testPlanID=95;
// $testCaseID=86;
// $testCaseExternalID=null;
// $buildID=50;
// $exec_notes="";
//
$unitTestDescription = "Test - Call with valid parameters: testPlanID,testCaseID,buildID";
$testPlanID = 389;
// $testCaseExternalID='API-71';  // 'API-69'
$testCaseExternalID = 'API-66';
$testCaseID = null;
$buildID = 21;
$status = $tcaseStatusCode['blocked'];
//$status=$tcaseStatusCode['failed'];
//$status=$tcaseStatusCode['passed'];
$exec_notes = "Call using all EXTERNAL ID ({$testCaseExternalID}) - status={$status}";
//$platformName='NO PLATFORM LINKED';
$platformName = 'Solaris 9';
$overwrite = true;
$debug = false;
echo $unitTestDescription;
$response = reportResult($server_url, $testCaseID, $testCaseExternalID, $testPlanID, $buildID, null, $status, $exec_notes, $bug_id, $customfields, $platformName, $overwrite, $debug);
echo "<br> Result was: ";
// Typically you'd want to validate the result here and probably do something more useful with it
// print_r($response);
new dBug($response);
echo "<br>";
// Substitute for tcid and tpid that apply to your project
// $unitTestDescription="Test - Call with valid parameters: testPlanID,testCaseID,buildID";
// $testPlanID=446;
// $testCaseExternalID='AA-1';
// $testCaseID=null;
// $buildID=2;
// // $status=$tcaseStatusCode['departed'];
// $status=$tcaseStatusCode['blocked'];
// // $status=$tcaseStatusCode['wrong'];
// // $exec_notes="Call using all INTERNAL ID's ({$testCaseID}) - status={$status}";
Beispiel #3
0
// Convert to Object arrays
switch ($type) {
    case 'url':
        $objects = url2obj_new($rawObjects);
        break;
    case 'cpcode':
        $objects = cpcode2obj_new($rawObjects);
        break;
    default:
        $objects = [];
        break;
}
// Split object to be below CCU::MAX_REQUEST_BODY
//$objects = splitObjects($objects,CCU::MAX_REQUEST_BODY);
$objects = splitObjects($objects, 100);
print_r($objects);
exit(0);
try {
    $ccu = new CCU('default');
    batchRequests($action, $type, $network, $objects['process']);
    if ($check_progress) {
        checkProgress($objects['process']);
    }
} catch (Exception $e) {
    // Handle errors
    echo get_class($e) . ": An error has occurred: {$colors['red']}" . $e->getMessage() . "{$colors['white']}\n";
    echo "Please try again with --debug or --verbose flags.\n";
    exit(1);
}
reportResult($objects);