TravelingBirds

有责任,我们才有共识.

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  77 随笔 :: 13 文章 :: 6 评论 :: 0 引用

2012年1月9日 #

Sometimes if you want to run one application from a network driver by the silence model , the Windows will pop up one dialog of security warning .

Follow these steps to block this dialog.

 

1. Click Start–>Run and type gpedit.msc. Click OK

2. Go to User Configuration–>Administrative Templates–>Windows Components–>Attachment Manager

3. Add “.exe” to the “Inclusion list for moderate risk file types” setting. You can also add other file types.

This should disable the “the publisher could not be verified. Are you sure you want to run this software?” messages from appearing for that file type in the future.

 

posted @ 2012-01-09 17:52 zencorn 阅读(6) 评论(0) 编辑

2011年9月22日 #

1.  Perl 的标量表达式。

 

 

 

 

posted @ 2011-09-22 17:18 zencorn 阅读(14) 评论(0) 编辑

2011年9月19日 #

1. 下载Perl 的安装包 ActivePerl.

2. 运行安装文件.

3. 创建一个perl 脚本文件,执行语句.

 

c:\Perl\bin>perl.exe e:\David\PerlTemp
Hello World
.

 

4. 如正常执行,则Perl在windows下安装成功.

5. 将Perl 加为环境变量.

posted @ 2011-09-19 15:47 zencorn 阅读(9) 评论(0) 编辑

2011年9月2日 #

                                      知识共享许可协议Work by Jianfei is licensed under a Creative Commons wei 3.0 Unported License 

If you using VS  builded up a suite of project DLL files, and then want package them as an Exe file, Iexpress.exe should be a good tool for you needed.

 

1. E.g.  

2.

Iexpress.exe it’s free and it support command line. It’s a Windows Command. J

 

Start -> Run -> iexpress.exe

 

 

 

3.  Pick up the main application launch file from the list.

 4. Go througth all the follow steps, finally . You will get the install package file.

 

                 知识共享许可协议Work by Jianfei is licensed under a Creative Commons wei 3.0 Unported License
posted @ 2011-09-02 08:48 zencorn 阅读(25) 评论(0) 编辑

2011年7月25日 #

                                                                              知识共享许可协议Work by Jianfei is licensed under a Creative Commons wei 3.0 Unported License

[Background:   In this document it will show you how to build one test execution automation framework with STAF+STAX. And make it helps you daily testing schedule.

The STAF is a Java open source testing automation framework , it could provide a good resolution for our agile testing request. Basically, if your need assign a lof of automated test case to multi-machine or OS and execute them or running a somking testing against to latest product build by automatically, it is shoud be a good candiate to select.

                               

    And i think the difficulty points in that is the XML defination part, you will see all the programing and attributes is coded in the XML file.   The 'Pathon' script , one flexible interface which is supported by the STAF , also intergrated to the XML configure file

                    

[Resource :  We need to download these two plug-in and install them from http://staf.sourceforge.net/.

 

Latest Releases

 

[Note:]    The STAX is not an install package, only need to extract it to the folder of STAF location e.g. C:\STAF\services\stax .If there is no the 'services' folder under the 'staf'  should to create one by ourself.

 

[Configuration]  Now we need to make some modifications to the file of  '$STAF_Install_Directory\services\stax\STAF.cfg ', please pay attention to the stax path, we need make sure the folder name does not contains the other context like version etc. Because after we extracted the stax as one sub folder under the staf, its name would contain the version info like 'stax350' we need change it to 'stax'.

1 SERVICE STAX LIBRARY JSTAF EXECUTE \
2   {STAF/Config/STAFRoot}/services/stax/STAX.jar  OPTION J2=-Xmx384m
3 SERVICE EVENT LIBRARY JSTAF EXECUTE \
4   {STAF/Config/STAFRoot}/services/stax/STAFEvent.jar
5 SET MAXQUEUESIZE 10000

 

 

 

[Check Env Status         When you finished the STAF+STAF installation, please using the commandd of 'staf local service list' in cmd model to verify you configuration status.  You should get the response list like below.  Sorry,  before that please click the menu of ' programs->STAF->start STAF ...'  to open the STAF service .

C:\>staf local service list
Response
--------
Name      Library    Executable
--------- ---------- -----------------------------------
DELAY     
<Internal> <None>
DIAG      
<Internal> <None>
ECHO      <Internal> <None>
EVENT     JSTAF      C:
\STAF/services/stax/STAFEvent.jar
FS        
<Internal> <None>
HANDLE    
<Internal> <None>
HELP      
<Internal> <None>
LIFECYCLE 
<Internal> <None>
LOG       STAFLog    
<None>
MISC      
<Internal> <None>
PING      
<Internal> <None>
PROCESS   
<Internal> <None>
QUEUE     
<Internal> <None>
SEM       
<Internal> <None>
SERVICE   
<Internal> <None>
SHUTDOWN  
<Internal> <None>
STAX      JSTAF      C:
\STAF/services/stax/STAX.jar
TRACE     <Internal> <None>
TRUST     
<Internal> <None>
VAR       
<Internal> <None>

 

 

 [RFT Test Case Prepare: ] For now the STAF and STAX service is build successfully, then we need to get the case and execution work flow ready.  Firstly, I have wrap up my RFT case execution as one command line batch file 'RunCommRFT.bat'.  The context is

java -jar "%IBM_RATIONAL_RFT_INSTALL_DIR%\rational_ft.jar" -datastore E:\David\Trunk\RFTTrunk\Geneva -playback Core_Accounting.TestSTAFFScript

, and about run the RFT using command line method I will talk it in another session later.

 

[XML Configuration:]   At the first paragraph , I have introducted there has one important component to the STAF framework is the XML.  Now, let us to make a simple XML file to run our test script. The detailed description for each element node please see the comment with green color.

    

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">

<stax>

  
<!--
       
    1. The element of <defaultcall> is define a default execution function , name = 'main'.
    2. The <function > is the method structure ,tell the STAF service which machie is our target to run the command file.
       Note: The target    machine also need install the STAF & STAX successful.
   -->
    
<defaultcall function ="main"/>
    
<function name="main">
        
<process>
            
<location>'10.2.159.121'</location>
            
<command>'E:\David\RunCommRFT.bat'</command>
        
</process>
    
</function>
</stax>

 

 [Run the remoting command:Type into the command line like below in the CMD model, it will call the remoting machine 10.2.159.121 to run the command of 'E:\David\RunCommRFT.bat'.  Finally, you will get a return number that mean the task in process....

 

staf local stax execute file C:/STAF/services/stax/samples/Mysample.xml MACHINE 10.2.159.121 FUNCTION main

 

[Reference documentation:]

1.  http://wenku.baidu.com/view/467a4834eefdc8d376ee3265.html

2. http://wenku.baidu.com/view/9f517fd084254b35eefd3465.html

3. http://wenku.baidu.com/view/1ae05244b307e87101f696c6.html

 

 

 

知识共享许可协议
Work by Jianfei is licensed under a Creative Commons wei 3.0 Unported License.
posted @ 2011-07-25 11:09 zencorn 阅读(109) 评论(0) 编辑

2011年6月29日 #

摘要: publicbooleanreplacesFileHeader(StringstrFillFullPath){booleanbFlag=false;try{Fileinfile=newFile(strFillFullPath);BufferedReaderin=newBufferedReader(newInputStreamReader(newFileInputStream(infile)));Fileoutfile=newFile(infile+".tmp");PrintWriterout=newPrintWriter(newBufferedWriter(newOutpu阅读全文
posted @ 2011-06-29 16:56 zencorn 阅读(40) 评论(0) 编辑

2011年5月19日 #

摘要: Work by Jianfei is licensed under a Creative Commons wei 3.0 Unported License. 1. As we knew SQL Serverhas provided a serices of XML execution function, we can using SQL query to get the field values directly. Please see following steps to create your own SQL xml query statement.-- Get the XML colum阅读全文
posted @ 2011-05-19 14:44 zencorn 阅读(79) 评论(0) 编辑

2011年5月11日 #

摘要: 1. We have a class and define a static method of getInstance() publicclassGenDarwinGlobalextendsGenDarwinGlobalHelper{/***ScriptName:<b>GenDarwinGlobal</b>*Generated:<b>Mar31,20111:16:48AM</b>*Description:FunctionalTestScript*OriginalHost:WinNTVersion5.2Build3790(S)**@since20阅读全文
posted @ 2011-05-11 15:41 zencorn 阅读(73) 评论(0) 编辑

2011年5月9日 #

摘要: Work by Jianfei is licensed under a Creative Commons wei 3.0 Unported License. It's better to take a look this code line in below, before we using a judgement code statement to verify a string value 1:if((objectA.getStringValue()!=null)&&(objectA.getStringValue().length()!=0))2:if(object阅读全文
posted @ 2011-05-09 14:49 zencorn 阅读(7) 评论(0) 编辑

2011年4月14日 #

摘要: Usually we using the Page.User.Identity.Name to get the web client user name . But if we are in the Active Directores enviroment and try to do this will be failed. So we need to set the web server like show in below firstly.Now the web server will replace the ISUER_MachineName login model as window 阅读全文
posted @ 2011-04-14 14:56 zencorn 阅读(44) 评论(0) 编辑