我还找了一些 Sample Code,大家也可以看看,Perl写的,简单易懂:
require TechExcel::Integration::DevTest::Scc::VersionLink;
require TechExcel::Integration::Db::SqlTypes;
# the integration server is installed on the local machine, using TCP port 8340
my $int_server_name = "localhost";
my $int_server_port = 8340;
# the devtest application server is installed on a machine called ‘galleria’, using TCP port 8338
my $app_server_name = "localhost";
my $app_server_port = 8338;
# the document server is installed on the local machine, using TCP port 8339
my $doc_server_host = "localhost";
my $doc_server_port = 8339;
my $project_name = "Sample Work Project";
my $project_type = 3; # test task project
my $login_name = "terry-j";
my $ppu = new TechExcel::Integration::DevTest::Scc::VersionLink();
if ($ppu->Init($int_server_name, $int_server_port, $doc_server_host, $doc_server_port,
$app_server_name, $app_server_port, $project_name, $project_type, $login_name))
{
#reload the project settings
$ppu->ReloadAllSettings();
### Update a test task issue
#my $st = new TechExcel::Integration::Db::SqlTypes();
#my $Names = [
# "Title",
# ];
#my $Values = [
# "Test bug from TechExcel DevTest Integration API #1",
# ];
#my $SqlTypes = [
# $st->CHAR,
# ];
#my $RetStatus;
#$RetStatus = $ppu->UpdateTestTaskInfo(475, $Names, $Values, $SqlTypes );
#print("Status=" . $RetStatus);
#exit 0;
### Associate a test task with a DevTrack bug
#my $IssueID = 475;
#my $DtkProjectID = 1;
#my $DtkBugID = 39;
#my $LinkTypeID = 1;
#my $LinkDescription = "blah, blah, ...";
#my $RetStatus = $ppu->AssociateOneBug( $IssueID, $DtkProjectID, $DtkBugID,
# $LinkTypeID, $LinkDescription );
#exit 0;
### Add a note
#my $IssueID = 475;
#my $NoteTitle = "note from devtest integratin api";
#my $NoteDescription = "test for note attachment";
#my $NewNoteID = $ppu->InsertOneIssueNote( $IssueID, $NoteTitle, $NoteDescription );
#exit 0;
### Add a note with attachment
#my $IssueID = 475;
#my $NoteID = $NewNoteID;
#my $AttachmentType = 2; # file attachment
#my $FilePath = "c:\\";
#my $FileName = "test.txt";
#my $RetStatus = $ppu->AddOneIssueAttachment($IssueID, $NoteID, $AttachmentType,
# $FilePath, $FileName);
#exit 0;
关于测试管理与自动化测试的介绍就到这里,接下来我会继续关注更多的相关方面,然后给大家写下我的使用心得,谢谢大家!
(完)