*/
require_once 'util.php';
require_once 'sample.inc.php';
show_api_db_sample_msg();
// common
$cfg = new stdClass();
$cfg->debug = false;
$cfg->devKey = 'Spock (The Tholian Web)';
$cfg->prefix = 'AXE';
$args4call = array();
// $server_url is GLOBAL created on some previous include
$op = createTestProject($server_url, $cfg, $args4call);
$op = createTestPlan($server_url, $cfg, $args4call);
if (isset($op[0]['status']) && $op[0]['status']) {
    $tplan_id = $op[0]['id'];
    $op = createBuild($server_url, $cfg, $args4call, $tplan_id);
}
$platformSet = array();
$dummy = new stdClass();
$dummy->name = 'Ferrari';
$dummy->notes = 'Italy';
$platformSet[$dummy->name] = $dummy;
$dummy = new stdClass();
$dummy->name = 'Porsche';
$dummy->notes = 'Germany';
$platformSet[$dummy->name] = $dummy;
$dummy = new stdClass();
$dummy->name = 'Renault';
$dummy->notes = 'France';
$platformSet[$dummy->name] = $dummy;
foreach ($platformSet as $name => &$item) {
예제 #2
0
<?php

include 'build.php';
include 'utils.php';
/**
* php appmanager.php --app Lottomatica -i --deliverable iOS --relName "Feature Visore" --relDir "dirrel" --relVersion 1.5.20 --relBranch trunk --relRevision 6509 --relDate "2015-09-13" --relTime "12:10:23" --tags "BU,ok" --buildName "Staging" --buildPath "Staging" 
**/
/*
php appmanager.php --app Better --deliverable Android --relName "Android Test x BU" --relDir "dirrel" --relVersion 1.5.20 --relBranch trunk --relRevision 6509 --relDate "2015-09-13" --relTime "12:10:23" --tags "BU,ok" --buildName "Staging2" --buildPath "Staging" 
**/
$opts = getoptreq('i', array('app:', 'deliverable:', 'relName:', 'relDir:', 'relVersion:', 'relBranch:', 'relRevision:', 'relDate:', 'relTime:', 'tags:', 'buildName:', 'buildPath:'));
//var_dump($opts);
$build = createBuild($opts);
$build->printBuild();
addBuild($build);
function addBuild($build)
{
    $string = file_get_contents("../data/appz.json");
    $json_appz = json_decode($string, true);
    print "\nAdding new BUILD\n====\n";
    $appNode = $json_appz[$build->application];
    if ($appNode != null) {
        print "App '" . $build->application . "'' found!\n";
        $deliverablesNode = $appNode["deliverables"];
        foreach ($deliverablesNode as $deliverableObject) {
            $deliverableNode = $deliverableObject[$build->deliverableType];
            if ($deliverableNode != null) {
                print "DeliverableType '" . $build->deliverableType . "'' found!\n";
                $deliverableFound = true;
                $releasesNodes = $deliverableNode["releases"];
                $releaseFound = false;
 * 
 */
require_once 'util.php';
require_once 'sample.inc.php';
show_api_db_sample_msg();
// common
$cfg = new stdClass();
$cfg->debug = false;
$cfg->devKey = 'admin';
$cfg->prefix = 'AX';
// $server_url is GLOBAL created on some previous include
$args4call = array();
$ret['createTestProject'] = createTestProject($server_url, $cfg, $args4call);
// $ret = createTestSuite($server_url$cfg,$args4call);
$ret['createTestPlan'] = createTestPlan($server_url, $cfg, $args4call);
$ret['createBuild'] = createBuild($server_url, $cfg, $args4call, $ret['createTestPlan'][0]['id']);
$ret['createPlatform'] = createPlatform($server_url, $cfg, $args4call);
/**
 *
 */
function createTestProject($server_url, $cfg, &$args4call)
{
    $method = __FUNCTION__;
    $args4call[$method] = array("devKey" => $cfg->devKey, "testcaseprefix" => $cfg->prefix, "testprojectname" => 'TPROJ-01', "notes" => "test project created using XML-RPC-API");
    $client = new IXR_Client($server_url);
    $client->debug = $cfg->debug;
    return runTest($client, $method, $args4call[$method]);
}
/**
 *
 */