测试管理以及与自动化测试的完美结合 - 4

我还找了一些 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;
 

 

关于测试管理与自动化测试的介绍就到这里,接下来我会继续关注更多的相关方面,然后给大家写下我的使用心得,谢谢大家!

 

(完)

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值