$dummy = explode(',', $run); $tc2run = array_flip($dummy); // .................................................................................. //if( isset($tc2run['all'] ) //{ // $tc2 //} //$suffix = $run == 'all' ? /* tc_a($client,$tcCounter); tc_b($client,$tcCounter); tc_c($client,$tcCounter); tc_d($client,$tcCounter); tc_e($client,$tcCounter); */ tc_sushi_rise($client, $tcCounter); // .................................................................................. // .................................................................................. function tc_b(&$client, &$tcCounter) { global $server_url; $method = 'createTestCase'; $unitTestDescription = "Test #{$tcCounter}- {$method} - With NAME exceeding limit"; $tcCounter++; $args = array(); $args["devKey"] = DEV_KEY; $args["testprojectid"] = 280; $args["testsuiteid"] = 297; $args["testcasename"] = 'TEST CASE NAME IS LONGER THAT ALLOWED SIZE - 100 CHARACTERS - The quick brown fox jumps over the X % lazydog (bye bye dog)'; $args["summary"] = 'Test Case created via API'; $args["preconditions"] = 'Test Link API Up & Running';
$other = array(); $status_ok = true; if ($status_ok) { $r = taskCreateTestProject($client, $tcCounter); $status_ok = !isset($r[0]['code']); } if ($status_ok) { $r = $r[0]; $other['testprojectid'] = $r['id']; $r = taskCreateTestSuite($client, $tcCounter, $other); $status_ok = !isset($r[0]['code']); } if ($status_ok) { $r = $r[0]; $other['testsuiteid'] = $r['id']; $r = tc_sushi_rise($client, $tcCounter, $other); $status_ok = !isset($r[0]['code']); } // ------------------------------------------------------------------------------- function tc_sushi_rise(&$client, &$tcCounter, $other) { $method = 'createTestCase'; $unitTestDescription = "Test #{$tcCounter}- {$method} - Test Case OK - Sushi Rice recipe"; $tcCounter++; $args = array(); $args["devKey"] = DEV_KEY; $args["testprojectid"] = $other["testprojectid"]; $args["testsuiteid"] = $other["testsuiteid"]; $args["testcasename"] = 'Sushi Rice recipe'; $args["summary"] = "When making authentic sushi, it is important to first create authentic sushi rice " . " -- it is, after all, the base flavor and texture of the rolls you create. " . " While it may seem difficult to make this recipe for the first time, " . " it is well worth perfecting. " . " It adds sweet, tangy flavor to sushi rolls, and the sticky texture is necessary " . " to hold the rolls together. Use this rice whenever cooked sushi rice is called for."; $args["preconditions"] = "3 cups uncooked sushi or sticky rice<br/>" . "3 cups water<br/>" . "1/2 cup rice vinegar<br/>" . "1/2cup sugar<br/>" . "1 teaspoon salt";